8000 Don't check plugin-generated functions by ikonst · Pull Request #16524 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Don't check plugin-generated functions #16524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
avoid checking decorators for synthetic functions
  • Loading branch information
ikonst committed Dec 11, 2023
commit 8980c84ffdaf91d520ea767150e0a4f7f47a4f73
2 changes: 2 additions & 0 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4876,6 +4876,8 @@ def visit_del_stmt(self, s: DelStmt) -> None:
)

def visit_decorator(self, e: Decorator) -> None:
if e.func.is_synthetic():
return
for d in e.decorators:
if isinstance(d, RefExpr):
if d.fullname == "typing.no_type_check":
Expand Down
0