Skip to content

Commit

Permalink
bool is a subclass of int, so don't change this line
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Aug 16, 2023
1 parent bfa05cd commit c6dc903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion productivity/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async def _parse_set_args(self, data_dict: Optional[dict],
for key, value in to_write.items():
start_address = self.tags[key]['address']['start']
data_type = self.tags[key]['type'].rstrip(digits)
if type(value) == int and data_type == 'float':
if type(value) == int and data_type == 'float': # noqa: E721
value = float(value)
if type(value) != pydoc.locate(data_type):
raise ValueError(f"Expected {key} to be a {data_type}.")
Expand Down

0 comments on commit c6dc903

Please sign in to comment.