org.sonar.l10n.py.rules.python.S2733.html Maven / Gradle / Ivy
This rule is deprecated; use {rule:python:S5722} instead.
Why is this an issue?
The __exit__
method is invoked with four arguments: self, type, value and traceback. Leave one of these out of the method declaration
and the result will be a TypeError
at runtime.
Noncompliant code example
class MyClass:
def __enter__(self):
pass
def __exit__(self, exc_type, exc_val): # Noncompliant
pass
© 2015 - 2024 Weber Informatics LLC | Privacy Policy