forked from platypush/platypush
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:
parent
5dabfed365
commit
98ec018292
1 changed files with 1 additions and 1 deletions
|
@ -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]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue