Skip to content

Commit 1b2bbbb

Browse files
committed
Purge unnecessary f-strings
1 parent 64a7cc3 commit 1b2bbbb

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

docs/output-subsystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def print_config_section():
556556
def print_error_info():
557557
"""Print diagnostic info to stderr."""
558558
console_print("Diagnostic information:", stderr=True)
559-
console_print(f" Error code: 42", stderr=True)
559+
console_print(" Error code: 42", stderr=True)
560560

561561
# === Progress Reporting Pattern ===
562562
import logging

src/jgo/cli/commands/remove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
nargs=-1,
2222
required=True,
2323
cls=click.RichArgument,
24-
help=f"One or more Maven coordinates in format "
24+
help="One or more Maven coordinates in format "
2525
f"{styled('g:a', g='groupId', a='artifactId')} (version optional)",
2626
)
2727
@click.option(

src/jgo/cli/commands/search.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424

2525
@click.command(
26-
help=f"Search for artifacts in [magenta]Maven repositories[/]. "
26+
help="Search for artifacts in [magenta]Maven repositories[/]. "
2727
f"Supports plain text, coordinates ({COORD_HELP_SHORT}), or SOLR syntax ([cyan]g: a:[/]).",
28-
epilog=f"[dim]TIP: Try [yellow]g:groupId a:artifactId[/] for SOLR syntax, "
28+
epilog="[dim]TIP: Try [yellow]g:groupId a:artifactId[/] for SOLR syntax, "
2929
f"[yellow]{COORD_HELP_FULL}[/] for coordinates, or plain text. "
30-
f"Use [yellow]*[/] for wildcards and [yellow]~[/] for fuzzy search.[/]",
30+
"Use [yellow]*[/] for wildcards and [yellow]~[/] for fuzzy search.[/]",
3131
)
3232
@click.option(
3333
"--limit",

src/jgo/exec/java_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _locate_system_java(self, required_version: int | None = None) -> Path:
109109
if actual_version < required_version:
110110
raise RuntimeError(
111111
f"Java {required_version} or higher required, but system Java is version {actual_version}. "
112-
f"Please upgrade Java or use auto mode for automatic Java management."
112+
"Please upgrade Java or use auto mode for automatic Java management."
113113
)
114114
else:
115115
self._maybe_log(f"Using system Java {actual_version} at {java_path}")

src/jgo/maven/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ def _import_boms(self, candidates: dict[GACT, Dependency]) -> None:
435435
if dep.version == "MANAGED":
436436
raise ValueError(
437437
f"{self.gav}: BOM {dep.groupId}:{dep.artifactId} has unresolved "
438-
f"MANAGED version. MANAGED versions must be resolved before "
439-
f"creating the wrapper POM."
438+
"MANAGED version. MANAGED versions must be resolved before "
439+
"creating the wrapper POM."
440440
)
441441

442442
bom_gav = f"{dep.groupId}:{dep.artifactId}:{dep.version}"
@@ -599,9 +599,9 @@ def _interpolate_deps(self, deps: dict[GACT, Dependency]) -> dict[GACT, Dependen
599599
# Check for collisions (rare, but possible)
600600
if new_gact in new_deps and new_gact != old_gact:
601601
_log.warning(
602-
f"Interpolation caused GACT key collision: "
602+
"Interpolation caused GACT key collision: "
603603
f"{old_gact} -> {new_gact}. "
604-
f"Keeping first occurrence (nearest wins)."
604+
"Keeping first occurrence (nearest wins)."
605605
)
606606
continue
607607

src/jgo/parse/endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def parse(cls, endpoint: "Endpoint" | str) -> "Endpoint":
139139
warnings.warn(
140140
f"Deprecated main class syntax: '{endpoint}'. "
141141
f"Use '{normalized}' instead. "
142-
f"The '@MainClass' should be at the end of the endpoint.",
142+
"The '@MainClass' should be at the end of the endpoint.",
143143
DeprecationWarning,
144144
stacklevel=2,
145145
)

tests/test_resolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,6 @@ def test_managed_version_resolution(m2_repo):
332332
assert len(optional_nodes) == 1, "Expected minimaven as root child"
333333
# The version should be resolved from dependency management (2.2.1)
334334
assert optional_nodes[0].dep.version == "2.2.1", (
335-
f"Expected minimaven version 2.2.1 from dependency management, "
335+
"Expected minimaven version 2.2.1 from dependency management, "
336336
f"got {optional_nodes[0].dep.version}"
337337
)

tests/test_thicket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_bom_imports(self, thicket_pom, thicket_context):
204204
# The model should have more managed dependencies than just the direct imports,
205205
# because BOMs import other BOMs transitively
206206
assert len(model.dep_mgmt) > direct_imports, (
207-
f"Expected transitive BOM imports to increase managed dependencies. "
207+
"Expected transitive BOM imports to increase managed dependencies. "
208208
f"Direct imports: {direct_imports}, total managed: {len(model.dep_mgmt)}"
209209
)
210210

0 commit comments

Comments
 (0)