Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code quality improvement, investigate ignored failures #437

Open
74 tasks
stephenworsley opened this issue Nov 18, 2024 · 0 comments
Open
74 tasks

Code quality improvement, investigate ignored failures #437

stephenworsley opened this issue Nov 18, 2024 · 0 comments
Labels
New: Issue Highlight a new community raised "generic" issue

Comments

@stephenworsley
Copy link
Contributor

stephenworsley commented Nov 18, 2024

Repo-review

  • "PC170", # PyGrep hooks
  • "PC180", # Uses prettier
  • "PY005", # Test folder location
  • "GH104", # Unique names for upload artifact
  • "GH212", # Require GHA update grouping

Numpydoc

  • "PR01", # Undocumented parameters
  • "PR02", # Unknown parameters
  • "PR04", # Untyped parameters
  • "PR05", # Improper "."
  • "PR07", # Undescribed parameter
  • "PR09", # Missing "."
  • "PR10", # Missing space before colon
  • "RT01", # Missing returns section
  • "RT03", # Undescribed return section
  • "RT05", # Missing "."
  • "GL08", # Missing docstring
  • "SS02", # Missing capitalisation
  • "SS05", # Third person grammar

Ruff

  • "ANN001", "ANN002", "ANN003", "ANN101", "ANN201", "ANN202", "ANN204", # Missing type annotations
  • "B904", # Try except handling
  • "C408", # Unnecessary dict call
  • "C901", # McCabe complexity
  • "D104", # Misssing docstring
  • "E501", # Line too long
  • "EM101", "EM102", # Exceptions using string literals
  • "ERA001", # Commented out code
  • "F401", "F403", # imports not used, consider adding to all
  • "FBT002", # Boolean default positional argument in function definition
  • "FIX002", # Line contains TODO
  • "FLY002", # Replace join with f-string
  • "INP001", # Missing init
  • "N802", "N806" # Upper case names
  • "PERF401", # Use a list comprehension to create a transformed list
  • "PLR0912", "PLR0913", "PLR0915", # Too many branches, arguments, statements
  • "PLR2004", # Magic value used in comparison
  • "PLW2901", # for loop target overwritten by assignment target
  • "PYI024", # Use typing.NamedTuple instead of collections.namedtuple
  • "RET504", # Unnecessary assignment before return
  • "S101", # Use of assert
  • "SIM108", # Use ternary operator instead of if-else-block
  • "SLF001", # Private member accessed
  • "TD002", "TD003", # Incomplete TODOs
  • "TID252", # Prefer absolute imports over relative imports from parent modules
  • "TRY003", # Avoid specifying long messages outside the exception class

per file:

tests

  • "B006", # Do not use mutable data structures for argument defaults
  • "N999", # Invalid module name
  • "PT006", "PT007", # Wrong types passed to @pytest.mark.parametrize
  • "PT011", # pytest.raises(ValueError) is too broad
  • "PTH118", "PTH123", # Replace os with Path
  • "S101", # Use of assert

benchmarks

  • "ANN205", # Missing type annotations
  • "ARG001", "ARG002", # Unused arguments
  • "B018", # Found useless expression
  • "B028", # No explicit stacklevel keyword argument found
  • "D102", "D103", # Missing docstring
  • "DTZ005", # datetime.datetime.now() called without a tz argument
  • "PLW1510", # subprocess.run without explicit check argument
  • "PTH107", "PTH110", # Replace os with Path
  • "RET503", # Missing explicit return at the end of function able to return non-None value
  • "RUF005", # Consider replacing concatenation
  • "RUF012", # Mutable class attributes should be annotated with typing.ClassVar
  • "S101", # Use of assert
  • "S603", "S607", # Untrusted subprocess call
  • "TRY002", # Create your own exception

conf

  • "A001", # shadowing python builtin
  • "E402", # Module level import not at top of file
  • "DTZ005", # datetime.datetime.now() called without a tz argument

noxfile

  • "FBT001", # Boolean-typed positional argument in function definition
  • "PIE810", # Call startswith/endswith once with a tuple
  • "S310", # Audit URL open for permitted schemes. Allowing use of file: or custom schemes is often unexpected.
  • "S506", # Consider yaml.safe_load
  • "SIM105", # Use contextlib.suppress(FileExistsError) instead of try-except-pass
  • "T201", # print found

setup

  • "EXE001", # Shebang is present but file is not executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New: Issue Highlight a new community raised "generic" issue
Projects
None yet
Development

No branches or pull requests

1 participant