Python has a weird built-in variable called __debug__ which is true when not running in optimized mode.
I guess there is only a limited number of packages using optimized mode, therefore using __debug__ spoils the code.
What do you think about a simple check finding __debug__ ? I'm happy to contribute it 😄
The purpose of this linter is to highlight code that is likely to indicate bugs. How would this proposed check help with that purpose? I'd assume people who use __debug__ generally know what they're doing.
Python has a weird built-in variable called
__debug__
which is true when not running in optimized mode. I guess there is only a limited number of packages using optimized mode, therefore using__debug__
spoils the code.What do you think about a simple check finding
__debug__
? I'm happy to contribute it 😄