Skip to content

Commit

Permalink
PEP 8 E721 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 committed Oct 7, 2023
1 parent 7278e2b commit 5f51d8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/variable/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def to_num(s):


def value_to_type(init_val, dest_type): # noqa: C901

if init_val is None or (
isinstance(init_val, str)
and init_val.lower() in ["", "none", "unknown", "unavailable"]
Expand Down Expand Up @@ -124,7 +123,7 @@ def value_to_type(init_val, dest_type): # noqa: C901
_LOGGER.debug(f"Invalid dest_type: {dest_type}, returning None")
raise ValueError(f"Invalid dest_type: {dest_type}")
return None
elif isinstance(init_val, datetime.date) and type(init_val) == datetime.date:
elif isinstance(init_val, datetime.date) and type(init_val) is datetime.date:
# _LOGGER.debug("[value_to_type] Processing as date")
if dest_type is None or dest_type == "string":
_LOGGER.debug(
Expand Down Expand Up @@ -153,7 +152,7 @@ def value_to_type(init_val, dest_type): # noqa: C901
raise ValueError(f"Invalid dest_type: {dest_type}")
return None
elif (
isinstance(init_val, datetime.datetime) and type(init_val) == datetime.datetime
isinstance(init_val, datetime.datetime) and type(init_val) is datetime.datetime
):
# _LOGGER.debug("[value_to_type] Processing as datetime")
if dest_type is None or dest_type == "string":
Expand Down

0 comments on commit 5f51d8c

Please sign in to comment.