Skip to content

Commit

Permalink
lint: appease linter for false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Feb 13, 2025
1 parent d573466 commit 1150954
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
hooks:
- id: clang-format
- repo: /~https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.5
rev: v0.9.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 2 additions & 1 deletion optree/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable, Iterable, Sequence, overload
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, Callable, Iterable, overload


if TYPE_CHECKING:
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ main.ignore-paths = ["^_C/$", "^tests/$"]
basic.good-names = []
design.max-args = 7
format.max-line-length = 120
"messages control".disable = ["duplicate-code", "consider-using-from-import"]
"messages control".disable = [
"duplicate-code",
"consider-using-from-import",
"unpacking-non-sequence",
"unsubscriptable-object",
]
"messages control".enable = ["c-extension-no-member"]
spelling.spelling-dict = "en_US"
spelling.spelling-private-dict-file = "docs/source/spelling_wordlist.txt"
Expand Down

0 comments on commit 1150954

Please sign in to comment.