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:
6
vppcfg
6
vppcfg
@ -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)
|
||||
|
Reference in New Issue
Block a user