@@ -47,8 +47,7 @@ class PackageNotFoundError(ModuleNotFoundError):
4747    """The package was not found.""" 
4848
4949    def  __str__ (self ):
50-         tmpl  =  "No package metadata was found for {self.name}" 
51-         return  tmpl .format (** locals ())
50+         return  f"No package metadata was found for { self .name }  
5251
5352    @property  
5453    def  name (self ):
@@ -385,7 +384,7 @@ def __init__(self, spec):
385384        self .mode , _ , self .value  =  spec .partition ('=' )
386385
387386    def  __repr__ (self ):
388-         return  '<FileHash mode: {} value: {}>'  . format ( self .mode ,  self . value ) 
387+         return  f '<FileHash mode: { self . mode } { self .value } >' 
389388
390389
391390class  Distribution :
@@ -569,13 +568,13 @@ def _convert_egg_info_reqs_to_simple_reqs(sections):
569568        """ 
570569
571570        def  make_condition (name ):
572-             return  name  and  'extra == "{name}"' . format ( name = name ) 
571+             return  name  and  f 'extra == "{ name } 
573572
574573        def  parse_condition (section ):
575574            section  =  section  or  '' 
576575            extra , sep , markers  =  section .partition (':' )
577576            if  extra  and  markers :
578-                 markers  =  '({markers})' . format ( markers = markers ) 
577+                 markers  =  f '({ markers } 
579578            conditions  =  list (filter (None , [markers , make_condition (extra )]))
580579            return  '; '  +  ' and ' .join (conditions ) if  conditions  else  '' 
581580
0 commit comments