2424from  ._itertools  import  always_iterable , unique_everseen 
2525from  ._meta  import  PackageMetadata , SimplePath 
2626
27+ from  collections .abc  import  Iterable , Mapping 
2728from  contextlib  import  suppress 
2829from  importlib  import  import_module 
2930from  importlib .abc  import  MetaPathFinder 
3031from  itertools  import  starmap 
31- from  typing  import  Any , Iterable ,  List ,  Mapping ,  Match , Optional ,  Set , cast 
32+ from  typing  import  Any , Match , Optional , cast 
3233
3334__all__  =  [
3435    'Distribution' ,
@@ -193,7 +194,7 @@ def attr(self) -> str:
193194        return  match .group ('attr' )
194195
195196    @property  
196-     def  extras (self ) ->  List [str ]:
197+     def  extras (self ) ->  list [str ]:
197198        match  =  self .pattern .match (self .value )
198199        assert  match  is  not None 
199200        return  re .findall (r'\w+' , match .group ('extras' ) or  '' )
@@ -278,14 +279,14 @@ def select(self, **params) -> EntryPoints:
278279        return  EntryPoints (ep  for  ep  in  self  if  ep .matches (** params ))
279280
280281    @property  
281-     def  names (self ) ->  Set [str ]:
282+     def  names (self ) ->  set [str ]:
282283        """ 
283284        Return the set of all names of all entry points. 
284285        """ 
285286        return  {ep .name  for  ep  in  self }
286287
287288    @property  
288-     def  groups (self ) ->  Set [str ]:
289+     def  groups (self ) ->  set [str ]:
289290        """ 
290291        Return the set of all groups of all entry points. 
291292        """ 
@@ -496,7 +497,7 @@ def entry_points(self) -> EntryPoints:
496497        return  EntryPoints ._from_text_for (self .read_text ('entry_points.txt' ), self )
497498
498499    @property  
499-     def  files (self ) ->  Optional [List [PackagePath ]]:
500+     def  files (self ) ->  Optional [list [PackagePath ]]:
500501        """Files in this distribution. 
501502
502503        :return: List of PackagePath for this distribution or None 
@@ -589,7 +590,7 @@ def _read_files_egginfo_sources(self):
589590        return  text  and  map ('"{}"' .format , text .splitlines ())
590591
591592    @property  
592-     def  requires (self ) ->  Optional [List [str ]]:
593+     def  requires (self ) ->  Optional [list [str ]]:
593594        """Generated requirements specified for this Distribution""" 
594595        reqs  =  self ._read_dist_info_reqs () or  self ._read_egg_info_reqs ()
595596        return  reqs  and  list (reqs )
@@ -692,7 +693,7 @@ def __init__(self, **kwargs):
692693            vars (self ).update (kwargs )
693694
694695        @property  
695-         def  path (self ) ->  List [str ]:
696+         def  path (self ) ->  list [str ]:
696697            """ 
697698            The sequence of directory path that a distribution finder 
698699            should search. 
@@ -1011,7 +1012,7 @@ def entry_points(**params) -> EntryPoints:
10111012    return  EntryPoints (eps ).select (** params )
10121013
10131014
1014- def  files (distribution_name : str ) ->  Optional [List [PackagePath ]]:
1015+ def  files (distribution_name : str ) ->  Optional [list [PackagePath ]]:
10151016    """Return a list of files for the named package. 
10161017
10171018    :param distribution_name: The name of the distribution package to query. 
@@ -1020,7 +1021,7 @@ def files(distribution_name: str) -> Optional[List[PackagePath]]:
10201021    return  distribution (distribution_name ).files 
10211022
10221023
1023- def  requires (distribution_name : str ) ->  Optional [List [str ]]:
1024+ def  requires (distribution_name : str ) ->  Optional [list [str ]]:
10241025    """ 
10251026    Return a list of requirements for the named package. 
10261027
@@ -1030,7 +1031,7 @@ def requires(distribution_name: str) -> Optional[List[str]]:
10301031    return  distribution (distribution_name ).requires 
10311032
10321033
1033- def  packages_distributions () ->  Mapping [str , List [str ]]:
1034+ def  packages_distributions () ->  Mapping [str , list [str ]]:
10341035    """ 
10351036    Return a mapping of top-level packages to their 
10361037    distributions. 
0 commit comments