Skip to content

Commit ec9919a

Browse files
committed
chore: add Ruff logging format check
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 1512427 commit ec9919a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

bin/update_pythons.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def update_version_windows(self, spec: Specifier) -> ConfigWinCP | None:
9393
unsorted_versions = spec.filter(self.version_dict)
9494
versions = sorted(unsorted_versions, reverse=True)
9595

96-
log.debug(f"Windows {self.arch} {spec} has {', '.join(str(v) for v in versions)}")
96+
log.debug("Windows %s %s has %s", self.arch, spec, ", ".join(str(v) for v in versions))
9797

9898
if not versions:
9999
return None
@@ -254,7 +254,7 @@ def update_config(self, config: dict[str, str]) -> None:
254254
identifier = config["identifier"]
255255
version = Version(config["version"])
256256
spec = Specifier(f"=={version.major}.{version.minor}.*")
257-
log.info(f"Reading in '{identifier}' -> {spec} @ {version}")
257+
log.info("Reading in %r -> %s @ %s", str(identifier), spec, version)
258258
orig_config = copy.copy(config)
259259
config_update: AnyConfig | None = None
260260

@@ -282,7 +282,7 @@ def update_config(self, config: dict[str, str]) -> None:
282282
config.update(**config_update)
283283

284284
if config != orig_config:
285-
log.info(f" Updated {orig_config} to {config}")
285+
log.info(" Updated %s to %s", orig_config, config)
286286

287287

288288
@click.command()

bin/update_virtualenv.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ def git_ls_remote_versions(url) -> list[VersionTuple]:
5454
try:
5555
version = Version(version_string)
5656
if version.is_devrelease:
57-
log.info(f"Ignoring development release '{version}'")
57+
log.info("Ignoring development release %r", str(version))
5858
continue
5959
if version.is_prerelease:
60-
log.info(f"Ignoring pre-release '{version}'")
60+
log.info("Ignoring pre-release %r", str(version))
6161
continue
6262
versions.append(VersionTuple(version, version_string))
6363
except InvalidVersion:
64-
log.warning(f"Ignoring ref '{ref}'")
64+
log.warning("Ignoring ref %r", ref)
6565
versions.sort(reverse=True)
6666
return versions
6767

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ select = [
128128
"EM", # flake8-errmsg
129129
"ICN", # flake8-import-conventions
130130
"ISC", # flake8-implicit-str-concat
131+
"G", # flake8-logging-format
131132
"PGH", # pygrep-hooks
132133
"PIE", # flake8-pie
133134
"PL", # pylint

0 commit comments

Comments
 (0)