python-stratify
python-stratify copied to clipboard
Tracking Current outstanding pre-commit repo review actions
📰 Custom Issue
#276 will add a pre-commit action checking our repo against repo review.
To add this I have set all of the tests that currently fail to ignore in the pyproject.toml. We need to consider which/how many of these we can/want to implement into stratify, and which we are happy to leave on ignore.
Repo Review
- [ ] PY004: Has docs folder
- [ ] PP302: Sets a minimum pytest to at least 6
- [ ] PP304: Sets the log level in pytest
- [ ] PP305: Specifies xfail_strict
- [ ] PP306: Specifies strict config
- [ ] PP307: Specifies strict markers
- [ ] PP309: Filter warnings specified
- [ ] PY007: Supports an easy task runner (nox or tox)
- [ ] PP003: Does not list wheel as a build-dep
- [ ] PC111: Uses blacken-docs
- [x] PC140: Uses a type checker
- [x] PC160: Uses a spell checker
- [ ] PC170: Uses PyGrep hooks (only needed if rST present)
- [ ] PC180: Uses a markdown formatter
- [x] PC190: Uses Ruff
- [x] MY100: Uses MyPy (pyproject config)
- [x] RF001: Has Ruff config
- [ ] RTD100: Uses ReadTheDocs (pyproject config)
Ruff
- [ ] "ANN001", # Missing type annotation for function argument {name}
- [ ] "ANN002", # Missing type annotation for *{name}
- [ ] "ANN003", # Missing type annotation for **{name}
- [ ] "ANN201", # Missing return type annotation for public function {name}
- [ ] "ANN202", # Missing return type annotation for private function {name}
- [ ] "ANN204", # Missing return type annotation for special method {name}
- [ ] "ARG002", # Unused method argument: {name}
- [ ] "ARG003", # Unused class method argument: {name}
- [ ] "B028", # No explicit stacklevel keyword argument found
- [ ] "C405", # Unnecessary {obj_type} literal (rewrite as a set literal)
- [ ] "C419", # Unnecessary list comprehension
- [ ] "COM812", # Trailing comma missing.
- [ ] "COM819", # Trailing comma prohibited.
- [ ] "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
- [ ] "D106", # Missing docstring in public nested class
- [ ] "D205", # 1 blank line required between summary line and description
- [ ] "ERA001", # Found commented-out code
- [ ] "FBT002", # Boolean default positional argument in function definition
- [ ] "ISC001", # Implicitly concatenate string literals on one line.
- [ ] "N801", # Class name {name} should use CapWords convention
- [ ] "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
- [ ] "PT009", # Use a regular assert instead of unittest-style {assertion}
- [ ] "PT027", # Use pytest.raises instead of unittest-style {assertion}
- [ ] "RET504", # Unnecessary assignment to {name} before return statement
- [ ] "RUF005", # Consider {expression} instead of concatenation
- [ ] "RUF012", # Mutable class attributes should be annotated with typing.ClassVar
- [ ] "SLF001", # Private member accessed: {access}
- [ ] "T201", # print found
Per file
Tests
- [ ] "D100", # Missing docstring in public module
- [ ] "D205", # 1 blank line required between summary line and description
- [ ] "D401", # 1 First line of docstring should be in imperative mood
NumPydoc
- [ ] "GL01", # Permit summary line on same line as docstring opening quotes.
- [ ] "GL02", # Permit a blank line before docstring closing quotes.
- [ ] "GL03", # Ignoring.
- [ ] "GL08", # The object does not have a docstring
- [ ] "PR01", # Parameters {missing_params} not documented
- [ ] "PR02", # Unknown parameters {unknown_params}
- [ ] "PR10", # Parameter "{param_name}" requires a space before the colon separating the parameter name and type
- [ ] "RT04", # Return value description should start with a capital letter
- [ ] "SS06", # Summary should fit in a single line
- [ ] "SA01", # Not all docstrings require a "See Also" section.
- [ ] "ES01", # Not all docstrings require an "Extended Summary" section.
- [ ] "EX01", # Not all docstrings require an "Examples" section.
- [ ] "YD01", # Not all docstrings require a "Yields" section.
MyPy
(These are the groups of errors that we disable).
- [ ] "call-arg"
- [ ] "no-untyped-def"
- [ ] "no-untyped-def"
- [ ] "attr-defined"
- [ ] "misc"
- [ ] "index"
- [ ] "var-annotated"
- [ ] "assignment"