diff --git a/.azure-pipelines/syntax-validation.py b/.azure-pipelines/syntax-validation.py index 6483683..9359ad8 100644 --- a/.azure-pipelines/syntax-validation.py +++ b/.azure-pipelines/syntax-validation.py @@ -12,7 +12,7 @@ continue filename = os.path.normpath(os.path.join(base, f)) try: - with open(filename, "r") as fh: + with open(filename) as fh: ast.parse(fh.read()) except SyntaxError as se: failures += 1 diff --git a/procrunner/__init__.py b/procrunner/__init__.py index 8cc6bbb..31659ef 100644 --- a/procrunner/__init__.py +++ b/procrunner/__init__.py @@ -333,7 +333,7 @@ if key in self._extras: return self._extras[key] if not hasattr(self, key): - raise KeyError("Unknown attribute {key}".format(key=key)) + raise KeyError(f"Unknown attribute {key}") return getattr(self, key) def __eq__(self, other):