f-strings

This commit is contained in:
Devaev Maxim
2019-06-28 18:59:36 +03:00
parent ff270591b0
commit ef3c62a7af
15 changed files with 40 additions and 38 deletions

View File

@@ -36,7 +36,7 @@ def load_yaml_file(path: str) -> Any:
return yaml.load(yaml_file, _YamlLoader)
except Exception:
# Reraise internal exception as standard ValueError and show the incorrect file
raise ValueError("Incorrect YAML syntax in file %r" % (path))
raise ValueError(f"Incorrect YAML syntax in file {path!r}")
class _YamlLoader(yaml.SafeLoader):