Replaced `NoneType` reference.

`types.NoneType` is not always available on all Python versions, so we
have to make our own type for it.
This commit is contained in:
Fabio Manganiello 2023-04-01 22:42:13 +02:00
parent 5dabfed365
commit 98ec018292
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,4 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from types import NoneType
from typing import Collection, Iterable, List, Mapping, Optional, Tuple, Type, Union from typing import Collection, Iterable, List, Mapping, Optional, Tuple, Type, Union
from typing_extensions import override from typing_extensions import override
@ -16,6 +15,7 @@ from platypush.message.event.sensor import (
from platypush.plugins import RunnablePlugin, action from platypush.plugins import RunnablePlugin, action
from platypush.utils import get_plugin_name_by_class from platypush.utils import get_plugin_name_by_class
NoneType = type(None)
ThresholdType = Union[Numeric, Tuple[Numeric, Numeric]] ThresholdType = Union[Numeric, Tuple[Numeric, Numeric]]
ThresholdConfiguration = Union[ThresholdType, Mapping[str, ThresholdType]] ThresholdConfiguration = Union[ThresholdType, Mapping[str, ThresholdType]]