@@ -48,8 +48,7 @@ class PackageNotFoundError(ModuleNotFoundError):
4848 """The package was not found."""
4949
5050 def __str__ (self ):
51- tmpl = "No package metadata was found for {self.name}"
52- return tmpl .format (** locals ())
51+ return f"No package metadata was found for { self .name } "
5352
5453 @property
5554 def name (self ):
@@ -386,7 +385,7 @@ def __init__(self, spec):
386385 self .mode , _ , self .value = spec .partition ('=' )
387386
388387 def __repr__ (self ):
389- return '<FileHash mode: {} value: {}>' . format ( self .mode , self . value )
388+ return f '<FileHash mode: { self . mode } value: { self .value } >'
390389
391390
392391class Distribution :
@@ -570,13 +569,13 @@ def _convert_egg_info_reqs_to_simple_reqs(sections):
570569 """
571570
572571 def make_condition (name ):
573- return name and 'extra == "{name}"' . format ( name = name )
572+ return name and f 'extra == "{ name } "'
574573
575574 def parse_condition (section ):
576575 section = section or ''
577576 extra , sep , markers = section .partition (':' )
578577 if extra and markers :
579- markers = '({markers})' . format ( markers = markers )
578+ markers = f '({ markers } )'
580579 conditions = list (filter (None , [markers , make_condition (extra )]))
581580 return '; ' + ' and ' .join (conditions ) if conditions else ''
582581
0 commit comments