Skip to content

Commit

Permalink
Latest ruff (#34)
Browse files Browse the repository at this point in the history
* Ran 'pre-commit autoupdate'

* Updated Ruff preview rules for v0.9

* All changes for latest ruff
  • Loading branch information
jamesbraza authored Jan 21, 2025
1 parent 89d8767 commit 2cf41d1
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down Expand Up @@ -55,7 +55,7 @@ repos:
- id: nb-clean
args: [--preserve-cell-outputs, --remove-empty-cells]
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2024.11.25
rev: 2025.01.10
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/uv-pre-commit
Expand Down
2 changes: 1 addition & 1 deletion llmclient/rate_limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
GLOBAL_RATE_LIMITER_TIMEOUT = float(os.environ.get("RATE_LIMITER_TIMEOUT", "60"))

MATCH_ALL = None
MatchAllInputs = Literal[None]
MatchAllInputs = Literal[None] # noqa: PYI061
MATCH_MACHINE_ID = "<machine_id>"

FALLBACK_RATE_LIMIT = RateLimitItemPerSecond(3, 1)
Expand Down
100 changes: 99 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,65 @@ preview = true
[tool.ruff.lint]
explicit-preview-rules = true
extend-select = [
"AIR301",
"AIR302",
"AIR303",
"ASYNC116",
"B901",
"B909",
"B911",
"C420",
"DOC202",
"DOC403",
"DTZ901",
"E111",
"E112",
"E113",
"E114",
"E115",
"E116",
"E117",
"E201",
"E202",
"E203",
"E204",
"E211",
"E221",
"E222",
"E223",
"E224",
"E225",
"E226",
"E227",
"E228",
"E231",
"E241",
"E242",
"E251",
"E252",
"E261",
"E262",
"E265",
"E266",
"E271",
"E272",
"E273",
"E274",
"E275",
"E301",
"E302",
"E303",
"E304",
"E305",
"E306",
"E502",
"FAST003",
"FURB101",
"FURB103",
"FURB110",
"FURB113",
"FURB116",
"FURB118",
"FURB131",
"FURB132",
"FURB140",
Expand All @@ -301,10 +354,54 @@ extend-select = [
"FURB166",
"FURB171",
"FURB180",
"FURB188",
"FURB189",
"FURB192",
"LOG015",
"PLC1802",
"PLC1901",
"PLC2701",
"PLC2801",
"PLE0304",
"PLE1141",
"PLE4703",
"PLR0202",
"PLR0203",
"PLR0916",
"PLR1733",
"PLR6104",
"PLR6201",
"PLW0108",
"PLW0177",
"PLW1507",
"PLW3201",
"PTH210",
"PYI059",
"PYI061",
"RUF027",
"RUF028",
"RUF029",
"RUF031",
"RUF035",
"RUF036",
"RUF037",
"RUF038",
"RUF039",
"RUF040",
"RUF041",
"RUF043",
"RUF048",
"RUF049",
"RUF051",
"RUF052",
"RUF055",
"RUF056",
"RUF057",
"SIM905",
"TC007",
"TC008",
"UP042",
"UP044",
"W391",
]
external = [
"FURB", # refurb
Expand All @@ -313,6 +410,7 @@ external = [
# (e.g.) validating # noqa directives. Useful for retaining # noqa directives
# that cover plugins not yet implemented by Ruff.
ignore = [
"A005", # Overly pedantic
"ANN", # Don't care to enforce typing
"ARG002", # Thrown all the time when we are subclassing
"ARG003", # Thrown all the time when we are subclassing
Expand Down

0 comments on commit 2cf41d1

Please sign in to comment.