packaging icon indicating copy to clipboard operation
packaging copied to clipboard

Apply ruff/bugbear rules (B)

Open DimitriPapadopoulos opened this issue 11 months ago • 0 comments

B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling

https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/

B018 Found useless expression. Either assign it to a variable or remove it.

https://docs.astral.sh/ruff/rules/useless-expression/

Also, do not ignore ruff/bugbear rule B015 and B009: https://docs.astral.sh/ruff/rules/useless-comparison/ https://docs.astral.sh/ruff/rules/get-attr-with-constant/

DimitriPapadopoulos avatar Mar 10 '24 19:03 DimitriPapadopoulos