-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The Ruff hook complains about:
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1
- files were modified by this hook
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
- 'ignore' -> 'lint.ignore'
- 'select' -> 'lint.select'
- 'isort' -> 'lint.isort'
- 'pyupgrade' -> 'lint.pyupgrade'
- 'per-file-ignores' -> 'lint.per-file-ignores'
but when you fix that, the pyproject-fmt hook complains:
pyproject-fmt............................................................Failed
- hook id: pyproject-fmt
- exit code: 1
- files were modified by this hook
--- pyproject.toml
+++ pyproject.toml
@@ -63,37 +63,6 @@
".ruff_cache",
]
-[lint]
-# https://beta.ruff.rs/docs/configuration/
-select = [
- "E", # pycodestyle errors
- "W", # pycodestyle warnings
- "F", # pyflakes
- "I", # isort
- "C", # flake8-comprehensions
- "B", # flake8-bugbear
- "Q", # flake8-quotes
- "PLE", # pylint error
- "PLR", # pylint refactor
- "PLW", # pylint warning
- "UP", # pyupgrade
-]
-
-ignore = [
- "B006", # Do not use mutable data structures for argument defaults
- "PLR0913", # Too many arguments to function call,
-]
-
-isort.combine-as-imports = true
-# Preserve types, even if a file imports `from __future__ import annotations`.
-pyupgrade.keep-runtime-typing = true
-per-file-ignores."__init__.py" = [
- "F401", # unused-import
-]
-per-file-ignores."src/django_nh3/forms.py" = [
- "UP035", # import-replacements - breaks type hint Callable
-]
-
[tool.pytest]
DJANGO_SETTINGS_MODULE = "tests.settings"
django_find_project = false
@@ -139,6 +108,37 @@
module = "tests.*"
allow_untyped_defs = true
+[lint]
+# https://beta.ruff.rs/docs/configuration/
+select = [
+ "E", # pycodestyle errors
+ "W", # pycodestyle warnings
+ "F", # pyflakes
+ "I", # isort
+ "C", # flake8-comprehensions
+ "B", # flake8-bugbear
+ "Q", # flake8-quotes
+ "PLE", # pylint error
+ "PLR", # pylint refactor
+ "PLW", # pylint warning
+ "UP", # pyupgrade
+]
+
+ignore = [
+ "B006", # Do not use mutable data structures for argument defaults
+ "PLR0913", # Too many arguments to function call,
+]
+
+isort.combine-as-imports = true
+# Preserve types, even if a file imports `from __future__ import annotations`.
+pyupgrade.keep-runtime-typing = true
+per-file-ignores."__init__.py" = [
+ "F401", # unused-import
+]
+per-file-ignores."src/django_nh3/forms.py" = [
+ "UP035", # import-replacements - breaks type hint Callable
+]
+
[tool.rstcheck]
ignore_directives = [
"automodule",
I'm not really sure how to fix that to the point that all pre-commit hooks are satisfied.
Metadata
Metadata
Assignees
Labels
No labels