@@ -4,7 +4,8 @@ target-version = 'py312'
44preview = true
55
66select = [
7- ' E' , # pycodestyle
7+ ' E' , # pycodestyle (errors)
8+ ' W' , # pycodestyle (warnings)
89 ' F' , # pyflakes
910 ' N' , # pep8-naming
1011 ' Q' , # flake8-quotes
@@ -15,6 +16,7 @@ select = [
1516 ' C4' , # flake8-comprehensions
1617 ' INT' , # flake8-gettext
1718 ' LOG' , # flake8-logging
19+ ' G' , # flake8-logging-format
1820 ' B' , # flake8-bugbear
1921 ' A001' , # flake8-builtins
2022 ' COM' , # flake8-commas
@@ -42,6 +44,7 @@ ignore = [
4244 ' RUF015' , # not always more readable, and we don't do it for huge lists
4345 ' RUF022' , # autofix messes up our formatting instead of just sorting
4446 ' RUF027' , # also triggers on i18n functions -> too noisy for now
47+ ' RUF052' , # we often use underscore-prefixed variables in tests and to cache regexps in function definitions
4548 ' UP038' , # it looks kind of weird and it slower than a tuple
4649 ' D205' , # too many docstrings which have no summary line
4750 ' D301' , # https://github.com/astral-sh/ruff/issues/8696
@@ -59,8 +62,6 @@ ignore = [
5962 ' B011' , # we don't run python with `-O` (also see S101)
6063 ' B904' , # possibly useful but too noisy
6164 ' PIE807' , # `lambda: []` is much clearer for `load_default` in schemas
62- ' PT004' , # pretty weird + not a pytest convention: https://github.com/astral-sh/ruff/issues/8796
63- ' PT005' , # ^ likewise
6465 ' PT011' , # very noisy
6566 ' PT015' , # nice for tests but not so nice elsewhere
6667 ' PT018' , # ^ likewise
@@ -96,7 +97,7 @@ ignore = [
9697]
9798
9899extend-safe-fixes = [
99- ' RUF005' , # we typically don't deal with objects overriding `__add__` ir `__radd__`
100+ ' RUF005' , # we typically don't deal with objects overriding `__add__` or `__radd__`
100101 ' C4' , # they seem pretty safe
101102 ' UP008' , # ^ likewise
102103 ' D200' , # ^ likewise
@@ -142,8 +143,11 @@ classmethod-decorators = [
142143[lint .pydocstyle ]
143144convention = ' pep257'
144145
146+ [lint .ruff ]
147+ parenthesize-tuple-in-subscript = true
148+
145149[lint .per-file-ignores ]
146150# vendored code - don't care about most stuff in there
147- 'newdle/vendor/*.py' = [' N' , ' F841' , ' UP' , ' D' , ' PIE' , ' TID252' , ' TRY' ]
151+ 'newdle/vendor/*.py' = [' N' , ' F841' , ' UP' , ' D' , ' PIE' , ' TID252' , ' TRY' , ' RUF059 ' ]
148152# allow long lines in migrations (only do that for raw SQL please)
149153'newdle/migrations/versions/*.py' = [' E501' , ' D400' ]
0 commit comments