diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1e014057f4..4f40aa95b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: args: ["--profile", "black", --line-length=125] - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.10.1 hooks: - id: pyupgrade args: ["--py36-plus"] @@ -41,7 +41,7 @@ repos: - id: setup-cfg-fmt - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 exclude: docs/conf.py diff --git a/hls4ml/backends/template.py b/hls4ml/backends/template.py index 5da9bce04a..9638b53add 100644 --- a/hls4ml/backends/template.py +++ b/hls4ml/backends/template.py @@ -30,7 +30,7 @@ def _default_params(self, node): params = {} params.update(node.attributes) # Convert all bool attributes to lowercase strings - params = {key: str(val).lower() if type(val) == bool else val for key, val in params.items()} + params = {key: str(val).lower() if isinstance(val, bool) else val for key, val in params.items()} return params