Skip to content

Commit

Permalink
use ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering authored and abn committed Mar 13, 2024
1 parent e09a535 commit 133da2f
Show file tree
Hide file tree
Showing 3 changed files with 1,426 additions and 1,330 deletions.
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ repos:
- id: debug-statements
- id: check-docstring-first

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.3.2
hooks:
- id: ruff
- id: ruff-format
24 changes: 11 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,18 @@ export = "poetry_plugin_export.plugins:ExportApplicationPlugin"

[tool.ruff]
fix = true
target-version = "py38"
line-length = 88
extend-exclude = [
"docs/*",
# External to the project's coding standards
"tests/**/fixtures/*",
]

[tool.ruff.lint]
unfixable = [
"ERA", # do not autoremove commented out code
]
target-version = "py38"
line-length = 88
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand All @@ -63,27 +70,18 @@ extend-select = [
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
extend-exclude = [
"docs/*",
# External to the project's coding standards
"tests/**/fixtures/*",
]

[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
known-first-party = ["poetry_plugin_export"]
required-imports = ["from __future__ import annotations"]


[tool.black]
target-version = ['py38']
preview = true

[tool.mypy]
namespace_packages = true
show_error_codes = true
Expand Down
Loading

0 comments on commit 133da2f

Please sign in to comment.