Flake8 Bugbear Versions Save

A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

23.6.5

10 months ago
  • Include tox.ini in MANIFEST.in for sdist. (#389)
  • Improve B033 (duplicate set items) (#385)

23.5.9

11 months ago
  • Add B033: Detect duplicate items in sets
  • Add B908: Detect assertRauses like contexts only has top level statements that could throw
  • Add B028: Allow stacklevel to be explicitly assigned as a positional argument
  • Remove more < 3.8 checks / assertions

23.3.23

1 year ago
  • flake8-bugbear is now >= 3.8.1 project like flake8>=6.0.0
    • This has allowed some more modern AST usage cleanup and less CI running etc.
  • B030: Fix crash on certain unusual except handlers (e.g. except a[0].b:)

23.3.12

1 year ago
  • B950: now ignores 'noqa' and 'type: ignore' comments.
  • B005: Do not flag when using the strip() method on an imported module.
  • B030: Allow calls and starred expressions in except handlers.

23.2.13

1 year ago
  • B906: Add visit_Bytes, visit_Num and visit_Str to the list of visit_* functions that are ignored by the B906 check. The ast.Bytes, ast.Num and ast.Str nodes are all deprecated, but may still be used by some codebases in order to maintain backwards compatibility with Python 3.7.
  • B016: Warn when raising f-strings.
  • Add B028: Check for an explicit stacklevel keyword argument on the warn method from the warnings module.
  • Add B029: Check when trying to use except with an empty tuple i.e. except: ().
  • Add B032: Check for possible unintentional type annotations instead of assignments.

23.1.20

1 year ago
  • B024: now ignores classes without any methods. (#336)
  • B017: Don't warn when pytest.raises() has a match argument. (#334)
  • B906: Ignore visit_ functions with a _fields attribute that can't contain ast.AST subnodes. (#330)

23.1.17

1 year ago
  • Rename B028 to B907, making it optional/opinionated.

23.1.14

1 year ago
  • Add B906: visit_ function with no further calls to a visit function. (#313)
  • Add B028: Suggest !r when formatted value in f-string is surrounded by quotes. (#319)

22.12.6

1 year ago
  • Add B905: zip() without an explicit strict= parameter. (#314)
  • B027: ignore @overload when typing is imported with other names (#309)

22.10.27

1 year ago
  • B027: Ignore @overload decorator (#306)
  • B023: Also fix map (#305)
  • B023: Avoid false alarms with filter, reduce, key= and return. Added tests for functools (#303)