Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python and pre-commit dependencies #335

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
20 changes: 11 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ python_files = ["tests/*.py", "tests/*/*.py"]
# with noqa markers. This is therefore a reiatively relaxed configuration that
# errs on the side of disabling legitimate lints.
#
# Reference for settings: https://beta.ruff.rs/docs/settings/
# Reference for rules: https://beta.ruff.rs/docs/rules/
# Reference for settings: https://docs.astral.sh/ruff/settings/
# Reference for rules: https://docs.astral.sh/ruff/rules/
[tool.ruff]
line-length = 79
target-version = "py312"

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

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

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

[tool.ruff.flake8-bugbear]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Form",
"fastapi.Header",
Expand All @@ -209,18 +211,18 @@ extend-immutable-calls = [

# These are too useful as attributes or functions to allow the conflict with
# the built-in to rule out their use.
[tool.ruff.flake8-builtins]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = [
"help",
"id",
"type",
]

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

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

[tool.scriv]
Expand Down
Loading
Loading