@@ -493,10 +493,6 @@ def __init__(
493493 # since it's possible that the name will be there once the namespace is complete.
494494 self .incomplete_namespaces = incomplete_namespaces
495495 self .all_exports : list [str ] = []
496- # Map from module id to list of explicitly exported names (i.e. names in __all__).
497- # This is used by stubgen/stubtest, DO NOT use for any other purposes as it is
498- # not populated on incremental runs (nor in parallel mode).
499- self .export_map : dict [str , list [str ]] = {}
500496 self .plugin = plugin
501497 # If True, process function definitions. If False, don't. This is used
502498 # for processing module top levels in fine-grained incremental mode.
@@ -724,7 +720,6 @@ def refresh_top_level(self, file_node: MypyFile) -> None:
724720 if file_node .fullname == "typing_extensions" :
725721 self .add_typing_extension_aliases (file_node )
726722 self .adjust_public_exports ()
727- self .export_map [self .cur_mod_id ] = self .all_exports
728723 self .all_exports = []
729724
730725 def add_implicit_module_attrs (self , file_node : MypyFile ) -> None :
@@ -4061,7 +4056,11 @@ def check_and_set_up_type_alias(self, s: AssignmentStmt) -> bool:
40614056 type_params : TypeVarLikeList | None
40624057 all_type_params_names : list [str ] | None
40634058 if self .check_type_alias_type_call (s .rvalue , name = lvalue .name ):
4064- rvalue = s .rvalue .args [1 ]
4059+ rvalue = (
4060+ s .rvalue .args [1 ]
4061+ if s .rvalue .arg_kinds [1 ] == ARG_POS
4062+ else s .rvalue .args [s .rvalue .arg_names .index ("value" )]
4063+ )
40654064 pep_695 = True
40664065 type_params , all_type_params_names = self .analyze_type_alias_type_params (s .rvalue )
40674066 else :
@@ -4249,7 +4248,9 @@ def check_type_alias_type_call(self, rvalue: Expression, *, name: str) -> TypeGu
42494248 return False
42504249 if not self .check_typevarlike_name (rvalue , name , rvalue ):
42514250 return False
4252- if rvalue .arg_kinds .count (ARG_POS ) != 2 :
4251+ if rvalue .arg_kinds .count (ARG_POS ) != (
4252+ 2 - ("value" in rvalue .arg_names ) - ("name" in rvalue .arg_names )
4253+ ):
42534254 return False
42544255
42554256 return True
0 commit comments