Skip to content

Commit

Permalink
Remove pyproject.toml formatting (#3252)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jan 3, 2025
1 parent 60ba3d6 commit f7e45b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ repos:
hooks:
- id: shellcheck
args: ["--severity=style"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.5
hooks:
Expand Down
39 changes: 22 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ extend-exclude = '''

[tool.ruff]
# Ruff config: https://docs.astral.sh/ruff/settings
preview = true
fix = true
target-version = "py310"
line-length = 80
extend-exclude = [
Expand All @@ -110,11 +112,12 @@ extend-exclude = [
"tests/fixtures/**",
]

preview = true
fix = true
format.quote-style = "single"
format.docstring-code-format = false
lint.select = [
[tool.ruff.format]
quote-style = "single"
docstring-code-format = false

[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand Down Expand Up @@ -154,7 +157,7 @@ lint.select = [
"W", # pycodestyle
"YTT", # flake8-2020
]
lint.ignore = [
ignore = [
"A005", # allow to shadow stdlib and builtin module names
"COM812", # trailing comma, conflicts with `ruff format`
# Different doc rules that we don't really care about:
Expand All @@ -173,21 +176,25 @@ lint.ignore = [
"PLR6301", # do not require classmethod / staticmethod when self not used
"TRY003", # long exception messages from `tryceratops`
]
lint.per-file-ignores."tests/*.py" = [
external = [ "WPS" ]

# Plugin configs:
flake8-import-conventions.banned-from = [ "ast" ]
flake8-quotes.inline-quotes = "single"
mccabe.max-complexity = 6
pydocstyle.convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"S101", # asserts
"S105", # hardcoded passwords
"S404", # subprocess calls are for tests
"S603", # do not require `shell=True`
"S607", # partial executable paths
]
lint.per-file-ignores."wemake_python_styleguide/compat/nodes.py" = [ "ICN003", "PLC0414" ]
lint.per-file-ignores."wemake_python_styleguide/types.py" = [ "D102" ]
lint.per-file-ignores."wemake_python_styleguide/visitors/ast/*.py" = [ "N802" ]
lint.external = [ "WPS" ]
lint.flake8-import-conventions.banned-from = [ "ast" ]
lint.flake8-quotes.inline-quotes = "single"
lint.mccabe.max-complexity = 6
lint.pydocstyle.convention = "google"
"wemake_python_styleguide/compat/nodes.py" = [ "ICN003", "PLC0414" ]
"wemake_python_styleguide/types.py" = [ "D102" ]
"wemake_python_styleguide/visitors/ast/*.py" = [ "N802" ]

[tool.pytest.ini_options]
# pytest config: http://doc.pytest.org/en/latest/customize.html
Expand Down Expand Up @@ -221,8 +228,6 @@ addopts = [
# We don't need to cover some files. They are fully checked with mypy.
# And don't contain any logic.
omit = [
# Does not contain runtime logic:
"wemake_python_styleguide/types.py",
# All version specific tests:
"tests/**/*312.py",
]
Expand Down

0 comments on commit f7e45b5

Please sign in to comment.