Skip to content

Commit

Permalink
docs(conf) Fix UP031 (printf-string-formatting)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tony committed Nov 25, 2024
1 parent 3e3de01 commit 467b348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 467b348

Please sign in to comment.