PY3.E0302
Unexpected special method signature
Emitted when a special method was defined with an invalid number of parameters. If it has too few or too many, it might not work at all.
Noncompliant Code:
Copy
class Foo:
def __enter__(self, context):
pass
def __exit__(self, type):
pass
Compliant Code:
Copy
class Foo:
def __enter__(self):
pass
def __exit__(self, type, value, traceback):
pass