From 43ed9ceb42c327d677f2089151b622b2034f0e7a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 00:29:34 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) - [github.com/pycqa/flake8: 6.0.0 → 6.1.0](https://github.com/pycqa/flake8/compare/6.0.0...6.1.0) - [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d470a67..9867f11 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-case-conflict - id: check-merge-conflict - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/pycqa/isort @@ -19,7 +19,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/pycqa/pydocstyle @@ -33,6 +33,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell From feff5fd4377b3ede0b4fa6dffbbf9f91c83bd0f0 Mon Sep 17 00:00:00 2001 From: Stefano Moia Date: Sun, 13 Aug 2023 14:08:30 +0200 Subject: [PATCH 2/2] Make flake8 happy again --- phys2cvr/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phys2cvr/io.py b/phys2cvr/io.py index 0bfad55..d39ba4d 100644 --- a/phys2cvr/io.py +++ b/phys2cvr/io.py @@ -65,7 +65,7 @@ def if_declared_force_type(var, dtype, varname="an input variable", silent=False elif dtype == "str": tmpvar = str(var) elif dtype == "list": - if type(var) == list: + if type(var) is list: tmpvar = var else: tmpvar = [var] @@ -73,7 +73,7 @@ def if_declared_force_type(var, dtype, varname="an input variable", silent=False raise NotImplementedError(f"Type {dtype} not supported") if not silent: - if type(tmpvar) != type(var): + if type(tmpvar) is not type(var): if varname != "an input variable": varname = f"variable {varname}"