Skip to content

Commit

Permalink
fix ruff config deprecation warnings
Browse files Browse the repository at this point in the history
It said:

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`:
  - 'dummy-variable-rgx' -> 'lint.dummy-variable-rgx'
  - 'fixable' -> 'lint.fixable'
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'
  - 'isort' -> 'lint.isort'
  - 'per-file-ignores' -> 'lint.per-file-ignores'

Fixed it the same way as in the Python template (NLeSC/python-template@3ce8ff9)
  • Loading branch information
egpbos committed Jul 30, 2024
1 parent 96677bf commit 9bc79b9
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,35 @@ extras = dev
"""

[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"scripts",
]

target-version = "py310"
line-length = 120


[tool.ruff.lint]
# Enable Pyflakes `E` and `F` codes by default.
select = [
"F", # Pyflakes
Expand Down Expand Up @@ -58,39 +87,13 @@ ignore = [
fixable = ["A", "B", "C", "D", "E", "F", "I"]
unfixable = []

exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"scripts",
]
per-file-ignores = {}


# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

target-version = "py310"
line-length = 120

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["dianna"]
force-single-line = true
no-lines-before = ["future","standard-library","third-party","first-party","local-folder"]

0 comments on commit 9bc79b9

Please sign in to comment.