Skip to content

Commit ad1fa9e

Browse files
author
Release Manager
committed
gh-39694: Ruff: move config to `pyproject.toml` Move config from ruff to `pyproject.toml` to fix some issues with VSCode and to reduce cluttering in the root. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #39694 Reported by: Tobias Diez Reviewer(s): Frédéric Chapoton
2 parents b40d3f9 + 3a9425c commit ad1fa9e

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

Diff for: .vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@
107107
"zmax",
108108
"zmin"
109109
],
110-
"editor.formatOnType": true,
110+
"[python]": {
111+
"editor.defaultFormatter": "charliermarsh.ruff"
112+
},
111113
"esbonio.sphinx.confDir": "",
112114
// Don't update the settings.json file with values inferred from Meson (we provide them manually)
113115
"mesonbuild.modifySettings": false,

Diff for: pyproject.toml

+22
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,25 @@ dev = [
183183
"grayskull",
184184
"toml",
185185
]
186+
187+
[tool.ruff]
188+
# https://docs.astral.sh/ruff/configuration
189+
190+
# Python 3.11 is the minimum supported version
191+
target-version = "py311"
192+
193+
[tool.ruff.lint]
194+
select = [
195+
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
196+
"F", # pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f
197+
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
198+
"PL", # pylint - https://docs.astral.sh/ruff/rules/#pylint-pl
199+
]
200+
ignore = [
201+
"E501", # Line too long - hard to avoid in doctests, and better handled by black.
202+
]
203+
204+
[tool.ruff.lint.per-file-ignores]
205+
"all.py" = [
206+
"F401", # Unused import - these files are by definition collections of imports.
207+
]

Diff for: ruff.toml

-19
This file was deleted.

0 commit comments

Comments
 (0)