Skip to content

Commit

Permalink
Update Python and JavaScript dependencies
Browse files Browse the repository at this point in the history
The new version of Ruff requires some changes to the configuration
to avoid warnings.
  • Loading branch information
rra committed Feb 5, 2024
1 parent 2e27017 commit 63b68fb
Show file tree
Hide file tree
Showing 6 changed files with 682 additions and 650 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.2.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -19,15 +19,15 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.10.1]
args: [-l, '79', -t, py311]
additional_dependencies: [black==24.1.1]
args: [-l, '79', -t, py312]

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.56.0
hooks:
- id: eslint
additional_dependencies:
- '@babel/[email protected].9'
- '@babel/[email protected].10'
- '@babel/[email protected]'
- [email protected]
- [email protected]
Expand Down
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ exclude = [
"docs/conf.py",
]
line-length = 79
target-version = "py311"

[tool.ruff.lint]
ignore = [
"ANN101", # self should not have a type annotation
"ANN102", # cls should not have a type annotation
Expand Down Expand Up @@ -204,9 +207,8 @@ ignore = [
"ISC002",
]
select = ["ALL"]
target-version = "py311"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"src/gafaelfawr/handlers/**" = [
"D103", # FastAPI handlers should not have docstrings
]
Expand All @@ -224,11 +226,11 @@ target-version = "py311"
"SLF001", # tests are allowed to access private members
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["gafaelfawr", "tests"]
split-on-trailing-comma = false

[tool.ruff.flake8-bugbear]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Form",
"fastapi.Header",
Expand All @@ -239,7 +241,7 @@ extend-immutable-calls = [

# These are too useful as attributes or methods to allow the conflict with the
# built-in to rule out their use.
[tool.ruff.flake8-builtins]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = [
"all",
"any",
Expand All @@ -251,14 +253,14 @@ builtins-ignorelist = [
"type",
]

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 11

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.scriv]
Expand Down
Loading

0 comments on commit 63b68fb

Please sign in to comment.