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

Extend linter config #1241

Open
2 of 9 tasks
flying-sheep opened this issue Nov 23, 2023 · 0 comments
Open
2 of 9 tasks

Extend linter config #1241

flying-sheep opened this issue Nov 23, 2023 · 0 comments

Comments

@flying-sheep
Copy link
Member

flying-sheep commented Nov 23, 2023

Please describe your wishes and possible alternatives to achieve the desired result.

Missing from #1117

extend-select = [
    "B",    # flake8-bugbear
    "C4",   # flake8-comprehensions
    "PERF", # More list comprehension rules
    "BLE",  # flake8-blind-except
    "PIE",  # Various useful rules
    "RUF",  # Various useful Ruff rules
    "EM",   # Error messages and tracebacks
    "ISC",  # Implicit string concatenation
    "SIM",  # Flow simplifications
]

Mentioned in #1117:

Currently, this adds all checks I think are very useful, minus the following that require more substantive changes:

The following stylistic rulesets are useful enough to go for but also need quite some changes

  • D/pydocstyle
  • RET/[return style] Clarifies early returns (if thing: return\nelse: ... → if thing: return...)

Also:

  • SIM for simplified code (e.g. ternaries instead of assignments in if/else)

  • Also maybe strict TCH

     [tool.ruff.lint.flake8-type-checking]
     strict = true
  • PYI for less-known typing stuff (like float meaning int | float) (Add PYI lints scanpy#3339, Add PYI lints #1747)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant