Move to f-strings

Used:
$ flynt -a -tc . vppcfg

Execution time:                            0.216s
Files checked:                             24
Files modified:                            13
Character count reduction:                 632 (0.36%)

Per expression type:
Old style (`%`) expressions attempted:     209/211 (99.1%)
No `.format(...)` calls attempted.
No concatenations attempted.
F-string expressions created:              205

Ran an integration test before and after. No diffs.
This commit is contained in:
Pim van Pelt
2022-04-22 10:58:41 +00:00
parent 13cdba1e1d
commit e13694a566
13 changed files with 205 additions and 205 deletions

View File

@ -30,7 +30,7 @@ def get_all_addresses_except_ifname(yaml, except_ifname):
ret.append(ipaddress.ip_interface(a))
if 'sub-interfaces' in iface:
for subid, sub_iface in iface['sub-interfaces'].items():
sub_ifname = "%s.%d" % (ifname, subid)
sub_ifname = f"{ifname}.{int(subid)}"
if sub_ifname == except_ifname:
continue