diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ac7bb1..5e762f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] @@ -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 diff --git a/llmclient/rate_limiter.py b/llmclient/rate_limiter.py index 73d0c8b..d193765 100644 --- a/llmclient/rate_limiter.py +++ b/llmclient/rate_limiter.py @@ -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 = "" FALLBACK_RATE_LIMIT = RateLimitItemPerSecond(3, 1) diff --git a/pyproject.toml b/pyproject.toml index c87e6cf..17ca2da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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 @@ -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