Skip to content

Commit 00ffcd1

Browse files
committed
docs(conf) Fix UP031 (printf-string-formatting)
https://docs.astral.sh/ruff/rules/printf-string-formatting/ docs/conf.py:201: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 9fa2782 commit 00ffcd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
198198
except Exception:
199199
lineno = None
200200

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

203203
fn = relpath(fn, start=pathlib.Path(libvcs.__file__).parent)
204204

0 commit comments

Comments
 (0)