Skip to content

Commit c1ec792

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

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
@@ -195,7 +195,7 @@ def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]:
195195
except Exception:
196196
lineno = None
197197

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

200200
fn = relpath(fn, start=pathlib.Path(django_docutils.__file__).parent)
201201

0 commit comments

Comments
 (0)