Skip to content

L2SS-583: Add bugbear to linting as to detect erroneous code

Corné Lukken requested to merge bugbear into master

Closes L2SS-583

Bugbear detects literal bugs, these includes statements without any effect: i + x or i == x instead of i = i + x / i = x.

But also more advanced niche gotchas like using hasattr(x, '__call__') instead of callable(x). Its a nice and cheap way to prevent bugs that can really throw you for a loop and have you scratching your head a long time.

I would encourage anyone to read the list of warnings: https://pypi.org/project/flake8-bugbear/

Edited by Corné Lukken

Merge request reports

Loading