Closed Klim314 closed 8 months ago
B026 does not apply to class methods, only to functions
Replicated on version 23.9.16
23.9.16
def foo(a, b, c): pass foo(a=1, b=2, c=3, *[1]) # linting error here class Bar: def foo(self, a, b, c): pass Bar().foo(a=1, b=2, c=3, *[1]) # no linting error
Good catch. This is likely fixable by unindenting https://github.com/PyCQA/flake8-bugbear/blob/78d08a741fc5053d2571a85f27e18f4625c1c269/bugbear.py#L443 by one level (plus adding some tests).
Summary
B026 does not apply to class methods, only to functions
Version
Replicated on version
23.9.16
Sample code