Fix: remove unnecessary f-strings without interpolation
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / codesniffer-shellcheck (push) Has been cancelled
Mark stable commit / codesniffer-ruff (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
Ruff (Python code sniffer) / codesniffer-ruff (push) Has been cancelled
ShellCheck / codesniffer-shellcheck (push) Has been cancelled
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / codesniffer-shellcheck (push) Has been cancelled
Mark stable commit / codesniffer-ruff (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
Ruff (Python code sniffer) / codesniffer-ruff (push) Has been cancelled
ShellCheck / codesniffer-shellcheck (push) Has been cancelled
Remove extraneous f-string prefixes from string literals that do not contain placeholders. This resolves Ruff F541 warnings without changing runtime behavior or output. https://chatgpt.com/share/693d5f15-f9e8-800f-bf69-b0dee0e4449c
This commit is contained in:
@@ -45,7 +45,7 @@ def config_init(
|
|||||||
# Announce where we will write the result
|
# Announce where we will write the result
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
print(f"[INIT] Writing user configuration to:")
|
print("[INIT] Writing user configuration to:")
|
||||||
print(f" {user_config_path}")
|
print(f" {user_config_path}")
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ def config_init(
|
|||||||
defaults_config["directories"]["repositories"]
|
defaults_config["directories"]["repositories"]
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"[INIT] Scanning repository base directory:")
|
print("[INIT] Scanning repository base directory:")
|
||||||
print(f" {repositories_base_dir}")
|
print(f" {repositories_base_dir}")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ def config_init(
|
|||||||
if new_entries:
|
if new_entries:
|
||||||
user_config.setdefault("repositories", []).extend(new_entries)
|
user_config.setdefault("repositories", []).extend(new_entries)
|
||||||
save_user_config(user_config, user_config_path)
|
save_user_config(user_config, user_config_path)
|
||||||
print(f"[SAVE] Wrote user configuration to:")
|
print("[SAVE] Wrote user configuration to:")
|
||||||
print(f" {user_config_path}")
|
print(f" {user_config_path}")
|
||||||
else:
|
else:
|
||||||
print("[INFO] No new repositories were added.")
|
print("[INFO] No new repositories were added.")
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ def _ensure_repo_dir(
|
|||||||
if not os.path.exists(repo_dir):
|
if not os.path.exists(repo_dir):
|
||||||
print(
|
print(
|
||||||
f"Repository directory '{repo_dir}' does not exist. "
|
f"Repository directory '{repo_dir}' does not exist. "
|
||||||
f"Cloning it now..."
|
"Cloning it now..."
|
||||||
)
|
)
|
||||||
clone_repos(
|
clone_repos(
|
||||||
[repo],
|
[repo],
|
||||||
@@ -87,7 +87,7 @@ def _ensure_repo_dir(
|
|||||||
if not os.path.exists(repo_dir):
|
if not os.path.exists(repo_dir):
|
||||||
print(
|
print(
|
||||||
f"Cloning failed for repository {identifier}. "
|
f"Cloning failed for repository {identifier}. "
|
||||||
f"Skipping installation."
|
"Skipping installation."
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class MakefileInstaller(BaseInstaller):
|
|||||||
if not ctx.quiet:
|
if not ctx.quiet:
|
||||||
print(
|
print(
|
||||||
f"[pkgmgr] Running 'make install' in {ctx.repo_dir} "
|
f"[pkgmgr] Running 'make install' in {ctx.repo_dir} "
|
||||||
f"(MakefileInstaller)"
|
"(MakefileInstaller)"
|
||||||
)
|
)
|
||||||
|
|
||||||
cmd = "make install"
|
cmd = "make install"
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class InstallationPipeline:
|
|||||||
# so we skip this installer entirely.
|
# so we skip this installer entirely.
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print(
|
print(
|
||||||
f"[pkgmgr] Skipping installer "
|
"[pkgmgr] Skipping installer "
|
||||||
f"{installer.__class__.__name__} for {identifier} – "
|
f"{installer.__class__.__name__} for {identifier} – "
|
||||||
f"CLI already provided by layer {state.layer.value!r}."
|
f"CLI already provided by layer {state.layer.value!r}."
|
||||||
)
|
)
|
||||||
@@ -171,7 +171,7 @@ class InstallationPipeline:
|
|||||||
# need to run another installer on top of it.
|
# need to run another installer on top of it.
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print(
|
print(
|
||||||
f"[pkgmgr] Skipping installer "
|
"[pkgmgr] Skipping installer "
|
||||||
f"{installer.__class__.__name__} for {identifier} – "
|
f"{installer.__class__.__name__} for {identifier} – "
|
||||||
f"layer {installer_layer.value!r} is already loaded."
|
f"layer {installer_layer.value!r} is already loaded."
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ def ensure_origin_remote(
|
|||||||
current = current_origin_url(repo_dir)
|
current = current_origin_url(repo_dir)
|
||||||
if current == url or not url:
|
if current == url or not url:
|
||||||
print(
|
print(
|
||||||
f"[INFO] 'origin' already points to "
|
"[INFO] 'origin' already points to "
|
||||||
f"{current or '<unknown>'} (no change needed)."
|
f"{current or '<unknown>'} (no change needed)."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ def update_spec_version(
|
|||||||
|
|
||||||
if preview:
|
if preview:
|
||||||
print(
|
print(
|
||||||
f"[PREVIEW] Would update spec file "
|
"[PREVIEW] Would update spec file "
|
||||||
f"{os.path.basename(spec_path)} to Version: {new_version}, Release: 1..."
|
f"{os.path.basename(spec_path)} to Version: {new_version}, Release: 1..."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ def list_repositories(
|
|||||||
f"{'STATUS'.ljust(status_width)} "
|
f"{'STATUS'.ljust(status_width)} "
|
||||||
f"{'CATEGORIES'.ljust(cat_width)} "
|
f"{'CATEGORIES'.ljust(cat_width)} "
|
||||||
f"{'TAGS'.ljust(tag_width)} "
|
f"{'TAGS'.ljust(tag_width)} "
|
||||||
f"DIR"
|
"DIR"
|
||||||
f"{RESET}"
|
f"{RESET}"
|
||||||
)
|
)
|
||||||
print(header)
|
print(header)
|
||||||
|
|||||||
@@ -200,8 +200,8 @@ def resolve_command_for_repo(
|
|||||||
print(
|
print(
|
||||||
f"[INFO] Repository '{repo_identifier}' appears to be a Python "
|
f"[INFO] Repository '{repo_identifier}' appears to be a Python "
|
||||||
f"package at '{python_package_root}' but no CLI entry point was "
|
f"package at '{python_package_root}' but no CLI entry point was "
|
||||||
f"found (PATH, Nix, main.sh/main.py). Treating it as a "
|
"found (PATH, Nix, main.sh/main.py). Treating it as a "
|
||||||
f"library-only repository with no command."
|
"library-only repository with no command."
|
||||||
)
|
)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user