diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f24edf..5dde50a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-added-large-files - id: check-json - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.282 + rev: v0.0.284 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/productivity/driver.py b/productivity/driver.py index 4476383..68f9159 100644 --- a/productivity/driver.py +++ b/productivity/driver.py @@ -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 isinstance(value, int) and data_type == 'float': value = float(value) if type(value) != pydoc.locate(data_type): raise ValueError(f"Expected {key} to be a {data_type}.") diff --git a/setup.py b/setup.py index 55028aa..cde04e2 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ 'pytest', 'pytest-cov', 'pytest-asyncio', - 'ruff==0.0.282', + 'ruff==0.0.284', 'types-PyYAML' ], },