summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Pentchev <roam@debian.org>2022-09-05 17:22:11 +0300
committerPeter Pentchev <roam@debian.org>2022-09-05 17:22:11 +0300
commita1775835cf424c9623265e8e9e0f173620966c3c (patch)
tree7c0d23c75cfb2e7eb31b1ac2fe73cbe4db1e1e0b
parent87a986ede7e0b8fc47f601bd99b0d086eefc5920 (diff)
autopkgtest: use f-strings
-rw-r--r--debian/tests/pyproject.toml3
-rwxr-xr-xdebian/tests/repotest.py9
2 files changed, 5 insertions, 7 deletions
diff --git a/debian/tests/pyproject.toml b/debian/tests/pyproject.toml
index 430048b..c9f44f1 100644
--- a/debian/tests/pyproject.toml
+++ b/debian/tests/pyproject.toml
@@ -4,6 +4,3 @@ line-length = 100
[tool.mypy]
strict = true
python_version = "3.7"
-
-[tool.pylint.messages]
-disable = ["consider-using-f-string"]
diff --git a/debian/tests/repotest.py b/debian/tests/repotest.py
index b6282e6..17895c4 100755
--- a/debian/tests/repotest.py
+++ b/debian/tests/repotest.py
@@ -41,13 +41,14 @@ def parse_args(tempd: pathlib.Path) -> Config:
# A sanity check
source = pathlib.Path(args.source)
if not source.is_dir():
- sys.exit("Not a directory: {source}".format(source=source))
- if not (source / "GNUmakefile").is_file():
- sys.exit("Not a file: {source}".format(source=source / "GNUmakefile"))
+ sys.exit(f"Not a directory: {source}")
+ makefile = source / "GNUmakefile"
+ if not makefile.is_file():
+ sys.exit(f"Not a file: {makefile}")
spec = pathlib.Path(args.spec)
if not spec.is_file():
- sys.exit("Not a file: {spec}".format(spec=spec))
+ sys.exit(f"Not a file: {spec}")
return Config(
repo=tempd / "repo",