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

6
vppcfg
View File

@ -74,11 +74,11 @@ def main():
try:
with open(args.config, "r") as f:
logging.info("Loading configfile %s" % args.config)
logging.info(f"Loading configfile {args.config}")
cfg = yaml.load(f, Loader = yaml.FullLoader)
logging.debug("Config: %s" % cfg)
logging.debug(f"Config: {cfg}")
except:
logging.error("Couldn't read config from %s" % args.config)
logging.error(f"Couldn't read config from {args.config}")
sys.exit(-1)
v = Validator(schema=args.schema)