Introduce bugbear
Based on !2281 (merged)
Closes #1743
This MR introduces bugbear rules. 5 rules were violated here:
- B006
- B007
- B017: required me to create a custom exception (outside of the scope of this work without a Maintainer's input)
- B018: Ignored for current cases because they are needed
- B904 (most of the changes): if the parent exception was caught, I used it in
raise ... from exception
, else I usedNone
.
Edited by Yoann Schneider