From c88755be612b003d75fc8219ffa5a08f1e20c448 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 30 Jun 2024 10:42:18 +0000 Subject: [PATCH] fix: [pre-commit.ci] auto fixes [...] --- optree/typing.py | 2 +- optree/version.py | 2 +- tests/test_ops.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/optree/typing.py b/optree/typing.py index 4ece56b0..33421e0b 100644 --- a/optree/typing.py +++ b/optree/typing.py @@ -308,7 +308,7 @@ def is_namedtuple_class(cls: type) -> bool: and issubclass(cls, tuple) and isinstance(getattr(cls, '_fields', None), tuple) and all( - type(field) is str # noqa: E721 # pylint: disable=unidiomatic-typecheck + type(field) is str # pylint: disable=unidiomatic-typecheck for field in cls._fields # type: ignore[attr-defined] ) and callable(getattr(cls, '_make', None)) diff --git a/optree/version.py b/optree/version.py index 6330937a..aed11685 100644 --- a/optree/version.py +++ b/optree/version.py @@ -26,7 +26,7 @@ try: prefix, sep, suffix = ( subprocess.check_output( - ['git', 'describe', '--abbrev=7'], # noqa: S603,S607 + ['git', 'describe', '--abbrev=7'], # noqa: S607 cwd=os.path.dirname(os.path.abspath(__file__)), stderr=subprocess.DEVNULL, text=True, diff --git a/tests/test_ops.py b/tests/test_ops.py index 9eaa277c..f4dd66dc 100644 --- a/tests/test_ops.py +++ b/tests/test_ops.py @@ -711,7 +711,7 @@ def test_tree_broadcast_map(): if trees.index(tree1) < trees.index(tree2): assert type(new_out[-1]) is OrderedDict else: - assert type(new_out[-1]) is dict # noqa: E721 + assert type(new_out[-1]) is dict def test_tree_broadcast_map_with_path():