@@ -68,16 +68,6 @@ where = ["src"]
6868write_to = " src/stratify/_version.py"
6969local_scheme = " dirty-tag"
7070
71- # [tool.black]
72- # target-version = ["py310", "py311", "py312"]
73- # line-length = 88
74- # include = '\.pyi?$'
75-
76- [tool .isort ]
77- profile = " black"
78- skip_gitignore = " True"
79- verbose = " True"
80-
8171[tool .check-manifest ]
8272ignore = [
8373 " src/stratify/_conservative.c" ,
@@ -122,13 +112,15 @@ checks = [
122112 # at the end of docstrings
123113 " GL03" , # Ignoring.
124114
125- " GL08" ,
115+ " GL08" , # The object does not have a docstring
116+
117+ " PR01" , # Parameters {missing_params} not documented
118+ " PR02" , # Unknown parameters {unknown_params}
119+ " PR10" , # Parameter "{param_name}" requires a space before the colon separating the parameter name and type
126120
127- " PR01" ,
128- " PR02" ,
129- " PR10" ,
130- " RT04" ,
131- " SS06" ,
121+ " RT04" , # Return value description should start with a capital letter
122+
123+ " SS06" , # Summary should fit in a single line
132124
133125
134126 # -> See Also section not found
@@ -160,47 +152,86 @@ preview = false
160152
161153[tool .ruff .lint ]
162154ignore = [
163- # NOTE: Non-permanent exclusions should be added to the ".ruff.toml" file.
164- " ERA001" ,
165- " RUF005" ,
166- " D100" ,
167- " B028" ,
168- " D101" ,
169- " RUF012" ,
170- " ANN201" ,
171- " D102" ,
172- " T201" ,
173- " C419" ,
174- " D104" ,
175- " D106" ,
176- " ANN202" ,
177- " SLF001" ,
178- " N801" ,
179- " D205" ,
180- " PT009" ,
181- " PT027" ,
182- " ANN001" ,
183- " ARG002" ,
184- " ARG003" ,
185- " ANN002" ,
186- " ANN204" ,
187- " D103" ,
188- " FBT002" ,
189- " ANN003" ,
190- " RET504" ,
191- " C405" ,
192- " PLR2004" ,
193155
156+ # flake8-annotations (ANN)
157+ # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
158+ " ANN001" , # Missing type annotation for function argument {name}
159+ " ANN002" , # Missing type annotation for *{name}
160+ " ANN003" , # Missing type annotation for **{name}
161+ " ANN201" , # Missing return type annotation for public function {name}
162+ " ANN202" , # Missing return type annotation for private function {name}
163+ " ANN204" , # Missing return type annotation for special method {name}
164+
165+ " ARG002" , # Unused method argument: {name}
166+ " ARG003" , # Unused class method argument: {name}
167+
168+ # flake8-bugbear (B)
169+ # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
170+ " B028" , # No explicit stacklevel keyword argument found
171+
172+ # flake8-comprehensions (C4)
173+ # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
174+ " C405" , # Unnecessary {obj_type} literal (rewrite as a set literal)
175+ " C419" , # Unnecessary list comprehension
194176
195177 # flake8-commas (COM)
196178 # https://docs.astral.sh/ruff/rules/#flake8-commas-com
197179 " COM812" , # Trailing comma missing.
198180 " COM819" , # Trailing comma prohibited.
199181
182+ # pydocstyle (D)
183+ # https://docs.astral.sh/ruff/rules/#pydocstyle-d
184+ " D100" , # Missing docstring in public module
185+ " D101" , # Missing docstring in public class
186+ " D102" , # Missing docstring in public method
187+ " D103" , # Missing docstring in public function
188+ " D104" , # Missing docstring in public package
189+ " D106" , # Missing docstring in public nested class
190+ " D205" , # 1 blank line required between summary line and description
191+
192+ # https://docs.astral.sh/ruff/rules/#eradicate-era
193+ # https://docs.astral.sh/ruff/rules/#eradicate-era
194+ " ERA001" , # Found commented-out code
195+
196+ # flake8-boolean-trap (FBT)
197+ # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
198+ " FBT002" , # Boolean default positional argument in function definition
199+
200200 # flake8-implicit-str-concat (ISC)
201201 # https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
202202 # NOTE: This rule may cause conflicts when used with "ruff format".
203203 " ISC001" , # Implicitly concatenate string literals on one line.
204+
205+ # pep8-naming (N)
206+ # https://docs.astral.sh/ruff/rules/#pep8-naming-n
207+ " N801" , # Class name {name} should use CapWords convention
208+
209+ # Refactor (R)
210+ # https://docs.astral.sh/ruff/rules/#refactor-r
211+ " PLR2004" , # Magic value used in comparison, consider replacing {value} with a constant variable
212+
213+ # flake8-pytest-style (PT)
214+ # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
215+ " PT009" , # Use a regular assert instead of unittest-style {assertion}
216+ " PT027" , # Use pytest.raises instead of unittest-style {assertion}
217+
218+ # flake8-return (RET)
219+ # https://docs.astral.sh/ruff/rules/#flake8-return-ret
220+ " RET504" , # Unnecessary assignment to {name} before return statement
221+
222+ # Ruff-specific rules (RUF)
223+ # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
224+ " RUF005" , # Consider {expression} instead of concatenation
225+ " RUF012" , # Mutable class attributes should be annotated with typing.ClassVar
226+
227+ # flake8-self (SLF)
228+ # https://docs.astral.sh/ruff/rules/#flake8-self-slf
229+ " SLF001" , # Private member accessed: {access}
230+
231+ # flake8-print (T20)
232+ # https://docs.astral.sh/ruff/rules/#flake8-print-t20
233+ " T201" , # print found
234+
204235 ]
205236 preview = false
206237 select = [
@@ -240,7 +271,6 @@ ignore = [
240271 " PP305" , # Specifies xfail_strict
241272 " PP306" , # Specifies strict config
242273 " PP307" , # Specifies strict markers
243- " PP308" ,
244274 " PP309" , # Filter warnings specified
245275 " PY007" , # Supports an easy task runner (nox or tox)
246276 " PP003" , # Does not list wheel as a build-dep
0 commit comments