Skip to content

Commit 7d241f3

Browse files
committed
docs(conf) Fix UP031 (printf-string-formatting)
https://docs.astral.sh/ruff/rules/printf-string-formatting/ docs/conf.py:197:16: UP031 Use format specifiers instead of percent format | 195 | lineno = None 196 | 197 | linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1) if lineno else "" | ^^^^^^^^^^ UP031 198 | 199 | fn = relpath(fn, start=pathlib.Path(vcspull.__file__).parent) | = help: Replace with format specifiers
1 parent 03adf56 commit 7d241f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
194194
except Exception:
195195
lineno = None
196196

197-
linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1) if lineno else ""
197+
linespec = f"#L{lineno}-L{lineno + len(source) - 1}" if lineno else ""
198198

199199
fn = relpath(fn, start=pathlib.Path(vcspull.__file__).parent)
200200

0 commit comments

Comments
 (0)