diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d29ed9a..b092fad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,15 +18,11 @@ repos: - id: debug-statements - id: check-docstring-first - - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.10.0 - hooks: - - id: black - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.8.0 hooks: - id: ruff + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 diff --git a/bin/website b/bin/website index 3ff7a31..fc3e437 100755 --- a/bin/website +++ b/bin/website @@ -174,19 +174,21 @@ class DocsPullCommand(ConfigureCommand): with temporary_directory() as tmp_dir: os.chdir(tmp_dir) tmp_dir = Path(tmp_dir) - subprocess.run([ - "git", - "clone", - "--single-branch", - "--branch", - version, - "--depth", - "1", - "--filter=blob:none", - "--sparse", - self.REPOSITORY, - ".", - ]) + subprocess.run( + [ + "git", + "clone", + "--single-branch", + "--branch", + version, + "--depth", + "1", + "--filter=blob:none", + "--sparse", + self.REPOSITORY, + ".", + ] + ) subprocess.run(["git", "sparse-checkout", "init", "--cone"]) subprocess.run(["git", "sparse-checkout", "set", "docs"]) diff --git a/pyproject.toml b/pyproject.toml index d3bb4f9..46e78d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,11 +17,10 @@ pre-commit = ">=2.13.0" [tool.ruff] fix = true -unfixable = [ - "ERA", # do not autoremove commented out code -] -target-version = "py310" line-length = 88 +target-version = "py310" + +[tool.ruff.lint] extend-select = [ "B", # flake8-bugbear "C4", # flake8-comprehensions @@ -36,20 +35,19 @@ extend-select = [ "TID", # flake8-tidy-imports "UP", # pyupgrade ] +unfixable = [ + "ERA", # do not autoremove commented out code +] -[tool.ruff.flake8-tidy-imports] +[tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all" -[tool.ruff.isort] +[tool.ruff.lint.isort] force-single-line = true lines-between-types = 1 lines-after-imports = 2 required-imports = ["from __future__ import annotations"] -[tool.black] -target-version = ["py310"] -preview = true - [tool.website.config] baseURL = "https://python-poetry.org/" languageCode = "en-us"