Skip to content

Commit

Permalink
QA fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Nov 29, 2021
1 parent 6d1ac57 commit cd89d42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion devices_module/bootstrap.py
Expand Up @@ -28,7 +28,7 @@

# Library libs
from devices_module.exchange import ModuleExchange
from devices_module.helpers import KeyHashHelpers, ItemValueHelpers
from devices_module.helpers import ItemValueHelpers, KeyHashHelpers
from devices_module.models import db
from devices_module.repositories import (
ChannelsConfigurationRepository,
Expand Down
9 changes: 3 additions & 6 deletions devices_module/helpers.py
Expand Up @@ -22,7 +22,7 @@
import math
import time
from datetime import datetime
from typing import Callable, Optional, Set, Union, Tuple
from typing import Callable, Optional, Set, Tuple, Union

# Library dependencies
from fastnumbers import fast_float, fast_int
Expand All @@ -47,11 +47,8 @@ def normalize_value( # pylint: disable=too-many-return-statements,too-many-bran
data_type: DataType,
value: Union[int, float, str, bool, datetime, ButtonPayload, SwitchPayload, None],
data_format: Union[
Tuple[Union[int, None], Union[int, None]],
Tuple[Union[float, None], Union[float, None]],
Set[str],
None
] = None
Tuple[Union[int, None], Union[int, None]], Tuple[Union[float, None], Union[float, None]], Set[str], None
] = None,
) -> Union[int, float, str, bool, datetime, ButtonPayload, SwitchPayload, None]:
"""Normalize property value based od property data type"""
if value is None:
Expand Down
7 changes: 2 additions & 5 deletions devices_module/items.py
Expand Up @@ -451,12 +451,9 @@ def format(self) -> Optional[str]:
# -----------------------------------------------------------------------------

def get_format( # pylint: disable=too-many-return-statements,too-many-branches
self
self,
) -> Union[
Tuple[Union[int, None], Union[int, None]],
Tuple[Union[float, None], Union[float, None]],
Set[str],
None
Tuple[Union[int, None], Union[int, None]], Tuple[Union[float, None], Union[float, None]], Set[str], None
]:
"""Property formatted value format"""
if self.__format is None:
Expand Down

0 comments on commit cd89d42

Please sign in to comment.