Skip to content

Commit

Permalink
fix: [pre-commit.ci] auto fixes [...]
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jun 30, 2024
1 parent 6f6bf35 commit c88755b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optree/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion optree/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit c88755b

Please sign in to comment.