From 122070cb8f0dc0cfb1ee0561292456f41b39102b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:57:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 106 ++++++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9e718a3a8..0150f6456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,84 +62,80 @@ docs = [ target-version = "py312" # Exclude the template content as most files aren't parseable extend-exclude = [ - "{{cookiecutter.project_slug}}/*", + "{{cookiecutter.project_slug}}/*", ] -[tool.ruff.lint] -select = [ - "F", - "E", - "W", - "C90", - "I", - "N", - "UP", - "YTT", +# ==== pytest ==== +lint.select = [ + "A", # "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm "ASYNC", - "S", - "BLE", - "FBT", "B", - "A", - "COM", + "BLE", "C4", + "C90", + "COM", "DTZ", - "T10", + "E", "EM", - "EXE", - "FA", - 'ISC', - "ICN", - "G", - 'INP', - 'PIE', - "T20", - 'PYI', - 'PT', - "Q", - "RSE", - "RET", - "SLF", - "SLOT", - "SIM", - "TID", - "TCH", - "INT", - # "ARG", # Unused function argument - "PTH", "ERA", - "PD", - "PGH", - "PL", - "TRY", + "EXE", + "F", + "FA", + "FBT", "FLY", + "G", + "I", + "ICN", + "INP", + "INT", + "ISC", + "N", + "PD", # "NPY", # "AIR", "PERF", + "PGH", + "PIE", + "PL", + "PT", + # "ARG", # Unused function argument + "PTH", + "PYI", + "Q", + "RET", + "RSE", # "FURB", # "LOG", "RUF", + "S", + "SIM", + "SLF", + "SLOT", + "T10", + "T20", + "TCH", + "TID", + "TRY", + "UP", + "W", + "YTT", ] -ignore = [ - "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ +lint.ignore = [ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` + "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "SIM102", # sometimes it's better to nest - "UP038", # Checks for uses of isinstance/issubclass that take a tuple - # of types for comparison. - # Deactivated because it can make the code slow: - # https://github.com/astral-sh/ruff/issues/7871 + "UP038", # Checks for uses of isinstance/issubclass that take a tuple + # of types for comparison. + # Deactivated because it can make the code slow: + # https://github.com/astral-sh/ruff/issues/7871 ] # The fixes in extend-unsafe-fixes will require # provide the `--unsafe-fixes` flag when fixing. -extend-unsafe-fixes = [ - "UP038", +lint.extend-unsafe-fixes = [ + "UP038", ] - -[tool.ruff.lint.isort] -force-single-line = true - -# ==== pytest ==== +lint.isort.force-single-line = true [tool.pytest.ini_options] addopts = "-v --tb=short"