@@ -215,7 +215,7 @@ def _fix_pypi_source(self, url):
215215 (
216216 'https' ,
217217 'files.pythonhosted.org' ,
218- '/packages/{}/{}/{}/{}' . format ( pkg_type , modname [ 0 ], modname , filename ) ,
218+ f '/packages/{ pkg_type } /{ modname [ 0 ] } /{ modname } /{ filename } ' ,
219219 '' ,
220220 '' ,
221221 '' ,
@@ -284,7 +284,7 @@ def _pkgname_to_brackety(token, brackety, conversions):
284284 # then add each pkgconfig to the list
285285 # print pkgconf_list
286286 for j in convers_list :
287- name = '{0 }({1 })'. format ( brackety , j )
287+ name = f' { brackety } ({ j } )'
288288 converted .append (RpmRequiresToken (name , token .operator , token .version ))
289289 return converted
290290
@@ -487,7 +487,7 @@ def add(self, line):
487487 source = self ._fix_pypi_source (source )
488488 if secure_source_available :
489489 source = self ._make_secure_url (source , skip_availabilty_check = True )
490- self ._add_line_value_to ('source' , source , key = 'Source%s' % match .group (1 ))
490+ self ._add_line_value_to ('source' , source , key = f 'Source{ match .group (1 )} ' )
491491 return
492492
493493 elif self .reg .re_patch .match (line ):
@@ -498,15 +498,15 @@ def add(self, line):
498498 else :
499499 zero = ''
500500 self ._add_line_value_to (
501- 'patch' , match .group (3 ), key = '%sPatch%s%s' % ( match .group (1 ), zero , match .group (2 )) ,
501+ 'patch' , match .group (3 ), key = f' { match .group (1 )} Patch { zero } { match .group (2 )} ' ,
502502 )
503503 return
504504
505505 elif self .reg .re_buildoption_phase .match (line ):
506506 match = self .reg .re_buildoption_phase .match (line )
507507 value = match .group (2 )
508508 self ._add_line_value_to (
509- 'buildoption_phase' , value , key = 'BuildOption{0}' . format ( match .group (1 ))
509+ 'buildoption_phase' , value , key = f 'BuildOption{ match .group (1 )} '
510510 )
511511 return
512512
@@ -624,7 +624,7 @@ def add(self, line):
624624 else :
625625 value = match .group (2 )
626626 self ._add_line_value_to (
627- 'requires_phase' , value , key = 'Requires{0}' . format ( match .group (1 ))
627+ 'requires_phase' , value , key = f 'Requires{ match .group (1 )} '
628628 )
629629 return
630630
@@ -663,7 +663,7 @@ def add(self, line):
663663 language = match .group (1 )
664664 # and what value is there
665665 content = match .group (2 )
666- self ._add_line_value_to ('summary_localized' , content , key = 'Summary{0}' . format ( language ) )
666+ self ._add_line_value_to ('summary_localized' , content , key = f 'Summary{ language } ' )
667667 return
668668
669669 elif self .reg .re_group .match (line ):
0 commit comments