Skip to content

Commit a6d7b41

Browse files
committed
use ruff format
1 parent a01113e commit a6d7b41

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ repos:
1818
- id: debug-statements
1919
- id: check-docstring-first
2020

21-
- repo: https://github.com/psf/black-pre-commit-mirror
22-
rev: 24.10.0
23-
hooks:
24-
- id: black
25-
2621
- repo: https://github.com/astral-sh/ruff-pre-commit
2722
rev: v0.8.0
2823
hooks:
2924
- id: ruff
25+
- id: ruff-format
3026

3127
- repo: https://github.com/pre-commit/mirrors-prettier
3228
rev: v4.0.0-alpha.8

bin/website

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,21 @@ class DocsPullCommand(ConfigureCommand):
174174
with temporary_directory() as tmp_dir:
175175
os.chdir(tmp_dir)
176176
tmp_dir = Path(tmp_dir)
177-
subprocess.run([
178-
"git",
179-
"clone",
180-
"--single-branch",
181-
"--branch",
182-
version,
183-
"--depth",
184-
"1",
185-
"--filter=blob:none",
186-
"--sparse",
187-
self.REPOSITORY,
188-
".",
189-
])
177+
subprocess.run(
178+
[
179+
"git",
180+
"clone",
181+
"--single-branch",
182+
"--branch",
183+
version,
184+
"--depth",
185+
"1",
186+
"--filter=blob:none",
187+
"--sparse",
188+
self.REPOSITORY,
189+
".",
190+
]
191+
)
190192
subprocess.run(["git", "sparse-checkout", "init", "--cone"])
191193
subprocess.run(["git", "sparse-checkout", "set", "docs"])
192194

pyproject.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ pre-commit = ">=2.13.0"
1717

1818
[tool.ruff]
1919
fix = true
20-
unfixable = [
21-
"ERA", # do not autoremove commented out code
22-
]
23-
target-version = "py310"
2420
line-length = 88
21+
target-version = "py310"
22+
23+
[tool.ruff.lint]
2524
extend-select = [
2625
"B", # flake8-bugbear
2726
"C4", # flake8-comprehensions
@@ -36,20 +35,19 @@ extend-select = [
3635
"TID", # flake8-tidy-imports
3736
"UP", # pyupgrade
3837
]
38+
unfixable = [
39+
"ERA", # do not autoremove commented out code
40+
]
3941

40-
[tool.ruff.flake8-tidy-imports]
42+
[tool.ruff.lint.flake8-tidy-imports]
4143
ban-relative-imports = "all"
4244

43-
[tool.ruff.isort]
45+
[tool.ruff.lint.isort]
4446
force-single-line = true
4547
lines-between-types = 1
4648
lines-after-imports = 2
4749
required-imports = ["from __future__ import annotations"]
4850

49-
[tool.black]
50-
target-version = ["py310"]
51-
preview = true
52-
5351
[tool.website.config]
5452
baseURL = "https://python-poetry.org/"
5553
languageCode = "en-us"

0 commit comments

Comments
 (0)