From 467b34867eb5f39b41981dec493e1412771d58c6 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 25 Nov 2024 07:17:43 -0600 Subject: [PATCH] docs(conf) Fix UP031 (printf-string-formatting) https://docs.astral.sh/ruff/rules/printf-string-formatting/ docs/conf.py:189:16: UP031 Use format specifiers instead of percent format | 187 | lineno = None 188 | 189 | linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1) if lineno else "" | ^^^^^^^^^^ UP031 190 | 191 | fn = relpath(fn, start=pathlib.Path(vcspull.__file__).parent) | = help: Replace with format specifiers --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1a697a966..dd9edab6f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -186,7 +186,7 @@ def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]: except Exception: lineno = None - linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1) if lineno else "" + linespec = f"#L{lineno}-L{lineno + len(source) - 1}" if lineno else "" fn = relpath(fn, start=pathlib.Path(libtmux.__file__).parent)