Skip to content

Commit fe71ad6

Browse files
committed
Do not warn when analysing a typeshed stub file.
1 parent e221e46 commit fe71ad6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7620,7 +7620,7 @@ def warn_deprecated(self, node: SymbolNode | None, context: Context) -> None:
76207620
node = node.func
76217621
if isinstance(node, (FuncDef, OverloadedFuncDef, TypeInfo)) and (
76227622
(deprecated := node.deprecated) is not None
7623-
):
7623+
) and not self.is_typeshed_stub:
76247624
warn = self.msg.fail if self.options.report_deprecated_as_error else self.msg.note
76257625
warn(deprecated, context, code=codes.DEPRECATED)
76267626

0 commit comments

Comments
 (0)