pypi flake8-bugbear 26.11.9

one hour ago
  • Drop Python 3.10 support (flake8 itself now requires >=3.11)
  • B018: only report a map(), filter(), reversed(), zip() or
    enumerate() statement when the name is the builtin, not when the module
    defines or imports its own function under that name, which may well do the work
  • B031, B911: a bare groupby/batched imported from itertools no longer
    counts as itertools when a later module-level def or assignment replaces it
  • B031, B911: an annotated batched: Callable = itertools.batched counts as
    itertools, like the same assignment without the annotation
  • B912, B913: only report map() and zip() when the name is the builtin, not
    when a module-level def, class, import or assignment replaces it with
    something else
  • B905, B910: only report zip() and defaultdict(int) when the name is the
    builtin zip/collections.defaultdict, not when a module-level def,
    class, import or assignment replaces it with something else
  • B018, B031, B905, B910, B911: an import or zip = builtins.zip style alias
    inside a function or class no longer overrides the module's own def,
    class or import of that name, since it only binds the name locally
  • B042: don't report an __init__ that calls a direct base class's __init__
    explicitly and forwards its own arguments unchanged and in order, like
    Exception.__init__(self, msg, opt), also after another base's __init__
    such as a mixin's
  • Add type hints throughout bugbear, checked with mypy --strict in tox and CI

Don't miss a new flake8-bugbear release

NewReleases is sending notifications on new releases.