Skip to content

Commit a0e25db

Browse files
committed
docs(conf) Fix UP031 (printf-string-formatting)
https://docs.astral.sh/ruff/rules/printf-string-formatting/ docs/conf.py:180:16: UP031 Use format specifiers instead of percent format | 178 | lineno = None 179 | 180 | linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1) if lineno else "" | ^^^^^^^^^^ UP031 181 | 182 | fn = relpath(fn, start=pathlib.Path(vcspull.__file__).parent) | = help: Replace with format specifiers/
1 parent 04fd7c1 commit a0e25db

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
@@ -177,7 +177,7 @@ def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]:
177177
except Exception:
178178
lineno = None
179179

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

182182
fn = relpath(fn, start=pathlib.Path(g.__file__).parent)
183183

0 commit comments

Comments
 (0)