Skip to content

Commit ec877a3

Browse files
committed
Exclude __exit__ from requiring argument annotations.
1 parent 6deb554 commit ec877a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flake8_missing_annotations/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ def visit_FunctionDef(self, function: ast.FunctionDef) -> None:
235235
elif is_fixture and arg.arg in pytest_fixture_whitelist:
236236
continue
237237

238+
elif function_name in {"__exit__"}:
239+
continue
240+
238241
offending_arguments.append(f"argument {arg.arg!r} is missing a type annotation")
239242

240243
if not is_test and function.returns is None and function_name not in {"__init__"}:

0 commit comments

Comments
 (0)