Allow typing.overload and typing_extensions.overload, fixes #1840, fixes #2117

This commit is contained in:
Dave Halter committed 2026-10-12 23:03:31 +02:00
1 parent 8a56168d9a
commit 91206f4c65
2 files changed
+29

No files matched your search

+4
View File
@@ -435,6 +435,10 @@ def _find_overload_functions(context, tree_node):
if dotted_name.type == 'name' and dotted_name.value == 'overload':
# TODO check with values if it's the right overload
return True
if dotted_name.type == 'atom_expr':
trailer = dotted_name.children[-1]
if trailer.children[0] == "." and trailer.children[1].value == "overload":
return True
return False
if tree_node.type == 'lambdef':