diff --git a/pyproject.toml b/pyproject.toml index 19f6332e7..72988e233 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -280,86 +280,6 @@ template = "changelog/_template.rst" name = "Trivial/Internal Changes" showcontent = true -[tool.black] -target-version = ['py38'] - -# check-wheel-contents is executed by the build-and-inspect-python-package action. -[tool.check-wheel-contents] -# W009: Wheel contains multiple toplevel library entries -ignore = "W009" - -[tool.ruff] -src = ["src"] -line-length = 88 -select = [ - "B", # bugbear - "D", # pydocstyle - "E", # pycodestyle - "F", # pyflakes - "I", # isort - "PYI", # flake8-pyi - "UP", # pyupgrade - "RUF", # ruff - "W", # pycodestyle -] -ignore = [ - # bugbear ignore - "B004", # Using `hasattr(x, "__call__")` to test if x is callable is unreliable. - "B007", # Loop control variable `i` not used within loop body - "B009", # Do not call `getattr` with a constant attribute value - "B010", # [*] Do not call `setattr` with a constant attribute value. - "B011", # Do not `assert False` (`python -O` removes these calls) - "B028", # No explicit `stacklevel` keyword argument found - # pycodestyle ignore - # pytest can do weird low-level things, and we usually know - # what we're doing when we use type(..) is ... - "E721", # Do not compare types, use `isinstance()` - # pydocstyle ignore - "D100", # Missing docstring in public module - "D101", # Missing docstring in public class - "D102", # Missing docstring in public method - "D103", # Missing docstring in public function - "D104", # Missing docstring in public package - "D105", # Missing docstring in magic method - "D106", # Missing docstring in public nested class - "D107", # Missing docstring in `__init__` - "D209", # [*] Multi-line docstring closing quotes should be on a separate line - "D205", # 1 blank line required between summary line and description - "D400", # First line should end with a period - "D401", # First line of docstring should be in imperative mood - "D402", # First line should not be the function's signature - "D404", # First word of the docstring should not be "This" - "D415", # First line should end with a period, question mark, or exclamation point - # ruff ignore - "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` -] - -[tool.ruff.format] -docstring-code-format = true - -[tool.ruff.lint] -allowed-confusables = ["’", "×"] - -[tool.ruff.lint.pycodestyle] -# In order to be able to format for 88 char in ruff format -max-line-length = 120 - -[tool.ruff.lint.pydocstyle] -convention = "pep257" - -[tool.ruff.lint.isort] -force-single-line = true -combine-as-imports = true -force-sort-within-sections = true -order-by-type = false -known-local-folder = ["pytest", "_pytest"] -lines-after-imports = 2 - -[tool.ruff.lint.per-file-ignores] -"src/_pytest/_py/**/*.py" = ["B", "PYI"] -"src/_pytest/_version.py" = ["I001"] -"testing/python/approx.py" = ["B015"] - [tool.mypy] mypy_path = ["src"] check_untyped_defs = true