diff --git a/maintainers/build-release-notes.py b/maintainers/build-release-notes.py index cc72c60b8..fbb489c79 100755 --- a/maintainers/build-release-notes.py +++ b/maintainers/build-release-notes.py @@ -1,6 +1,5 @@ #!@python@ -# ruff: noqa: T201 # Our generated MD file is expected on stdout # This is the only file and is executable from collections import defaultdict diff --git a/pyproject.toml b/pyproject.toml index e09dc9d99..553433964 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,6 @@ task-tags = ["TODO", "FIXME", "XXX"] # LOG: creation of logger objects # G: style of logging messages # PIE: unnecessary providing of stuff (placeholders, definitions, duplicates etc) -# T20: disallow prints in favor of using a logger # PT: pytest formatting things; fixtures, asserts, parametrizastions etc # Q: quote styling # RSE: check on raise statements @@ -140,14 +139,10 @@ task-tags = ["TODO", "FIXME", "XXX"] # PGH: things about pygrep, we don't use # FURB: covered by other rule sets # TRY: try and raise related things, not helpful as we only do testing -select = ["E4", "E7", "E9", "F", "ERA", "ASYNC", "ANN0", "ANN2", "A", "C4", "ISC", "INP", "LOG", "G", "PIE", "T20", "PT", "Q", "RSE", "RET", "SIM", "TID251", "TD", "ARG", "PTH", "N", "PERF", "PLC", "PLE", "UP", "RUF"] +# T20: Scripts usually output to stdout as either they are directly cli or passed into files +select = ["E4", "E7", "E9", "F", "ERA", "ASYNC", "ANN0", "ANN2", "A", "C4", "ISC", "INP", "LOG", "G", "PIE", "PT", "Q", "RSE", "RET", "SIM", "TID251", "TD", "ARG", "PTH", "N", "PERF", "PLC", "PLE", "UP", "RUF"] ignore = ["ANN002", "ANN003", "TD001", "TD003", "PLE1", "RUF005", "RUF003"] -[tool.ruff.lint.per-file-ignores] -# ignore open() and os.path.join() calls in test_evil_nars, as that file is working with raw bytes -# which pathlib does not support -"**/store/test_evil_nars.py" = ["PTH118", "PTH123"] - [tool.ruff.format] indent-style = "space" quote-style = "double" diff --git a/tests/functional2/pyproject.toml b/tests/functional2/pyproject.toml index be1e9137a..ffe377cc5 100644 --- a/tests/functional2/pyproject.toml +++ b/tests/functional2/pyproject.toml @@ -39,6 +39,15 @@ norecursedirs = [ '.*' ] [tool.ruff] extend = "../../pyproject.toml" +[tool.ruff.lint] +# T20: disallow prints in favor of using a logger for better tap compatibility +extend-select = ["T20"] + +[tool.ruff.lint.per-file-ignores] +# ignore open() and os.path.join() calls in test_evil_nars, as that file is working with raw bytes +# which pathlib does not support +"**/store/test_evil_nars.py" = ["PTH118", "PTH123"] + [tool.ruff.lint.flake8-tidy-imports] [tool.ruff.lint.flake8-tidy-imports.banned-api]