File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -59,18 +59,17 @@ def stdlib_list(version: str | None = None) -> list[str]:
5959
6060    data  =  pkgutil .get_data ("stdlib_list" , module_list_file ).decode ()  # type: ignore[union-attr] 
6161
62-     result  =  [y  for  y   in  [ x . strip ()  for   x   in  data .splitlines ()]  if  y ]
62+     result  =  [y  for  x   in  data .splitlines () if  ( y   :=   x . strip ()) ]
6363
6464    return  result 
6565
6666
6767@lru_cache (maxsize = 16 ) 
68- def  _stdlib_list_with_cache (version : str  |  None  =  None ) ->  list [str ]:
68+ def  _stdlib_list_with_cache (version : str  |  None  =  None ) ->  frozenset [str ]:
6969    """Internal cached version of `stdlib_list`""" 
70-     return  stdlib_list (version = version )
70+     return  frozenset ( stdlib_list (version = version ) )
7171
7272
73- @lru_cache (maxsize = 256 ) 
7473def  in_stdlib (module_name : str , version : str  |  None  =  None ) ->  bool :
7574    """ 
7675    Return a ``bool`` indicating if module ``module_name`` is in the list of stdlib 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments