Skip to content

Commit

Permalink
Update ruff with safe checks and checks to enable
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Sella <[email protected]>
  • Loading branch information
inknos committed Dec 11, 2024
1 parent ca78098 commit 3be44da
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

line-length = 100
[format]
exclude = [
Expand All @@ -17,16 +16,65 @@ select = [
"F", # Pyflakes
"E", # Pycodestyle Error
"W", # Pycodestyle Warning
# "I", # isort # some opinions here and there but probably autofixable
"N", # PEP8 Naming
# "D", # pydocstyle # Lots of errors but we definitely need to improve this
"UP", # Pyupgrade
"YTT", # flake-8-2020
# TODO "ANN",
"ASYNC", # flake8-async
"S", # Bandit
# "BLE", # flake8-blind-except # One simple fix
# "FBT", # flake8-boolean-trap # ~30 issues that can be fixed if the API does not break
"B", # Bugbear
"A", # flake-8-builtins
"YTT", # flake-8-2020
# "COM", # flake8-commas # many, many, autofixes
# "CPY", # flake8-copyright
# "C4", # flake8-comprehensions # trivial fixes
# "DTZ", # flake8-datetimez # Couple of errors here
"T10", # flake8-debugger
# "DJ", # flake8-django # Useless
# "EM", # flake8-errmsg # Fixes are many but should be easy
"EXE", # flake8-executable
# "FA", # flake9-future-annotations # Things are breaking...
# "ISC", # flake8-implicit-str-concat # Couple of concats, easy fix
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
# "G", # flake8-logging-format # Just one fix
# "INP", # flake8-no-pep420 # one fix
"PIE", # flake8-pie
# "T20", # flake8-print # Print should not be around
# "PYI", # flake8-pyi # Just two easy fixes
# "PT", # flake8-pytest-style # This is tricky and it makes ~500 errors that are not easy to fix
# "Q", # flake8-quotes # Probably ignored or fixed as last
# "Q003", # avoidable-escaped-quote # One simple fix
"Q004", # unnecessary-escaped-quote
# "RSE", # flake8-raise # One simple fix
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
# "SIM", # flake8-simplify # Tricky, 80 reworks are to do
# "TID", # flake8-tidy-imports # a couple of imports are flaky
"TC", # flake8-type-checking
"INT", # flake8-gettext
# "ARG", # flake8-unused-arguments # 27 not simple errors
# "PTH", # flake8-use-pathlib # Opinionated but reasonable open->Path.open fix
# "TD", # flake8-todo # better todos, optional but nice to have for future sanity
# "FIX", # flake8-fixme # For the same reason of todos, this is really nice to have for sanity
# "ERA", # eradicate # Sometimes commented out code is about documentation
# "PGH", # pygrep-hooks # One single error but maybe not simple
# "PL", # Pylint # is aliasing the following
"PLC", # Pylint Convention
# "PLR", # Pylint Refactor # ~30 ish errors
"PLW", # Pylint Warning
"PLE", # Pylint Error
"PLW", # Pylint Warning
# "TRY", # tryceratops # Exception handling, not easy fixes
"FLY", # flynt
# "PERF", # perflint # few fixes
"FURB", # refurb
"DOC", # pydoclint
# "RUF", # ruff # some opinions here and there... need to think about it
]
# Some checks should be enabled for code sanity disabled now
# to avoid changing too many lines
Expand Down

0 comments on commit 3be44da

Please sign in to comment.