Skip to content

Commit 56b3b47

Browse files
committed
Run the linter
1 parent 4a35e4a commit 56b3b47

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

src/jgo/cli/output.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,24 @@ def print_jars(environment: Environment) -> None:
6464
"""
6565
cp_jars = environment.class_path_jars
6666
mp_jars = environment.module_path_jars
67-
67+
6868
if not cp_jars and not mp_jars:
6969
_err_console.print("[red]No JARs in environment[/]")
7070
return
71-
71+
7272
# Print classpath JARs
7373
if cp_jars:
7474
_console.print("[bold cyan]Classpath:[/]")
7575
for jar_path in cp_jars:
7676
print(jar_path)
7777
if not mp_jars:
78-
_console.print("\n[dim]TIP: Use 'jgo info modulepath' to see module-path JARs only[/]")
78+
_console.print(
79+
"\n[dim]TIP: Use 'jgo info modulepath' to see module-path JARs only[/]"
80+
)
7981
else:
8082
_console.print("[yellow]No classpath JARs[/]")
8183
_console.print("[dim]TIP: Use 'jgo info modulepath' to see module-path JARs[/]")
82-
84+
8385
# Print module-path JARs
8486
if mp_jars:
8587
if cp_jars:
@@ -102,7 +104,9 @@ def print_modulepath(environment: Environment) -> None:
102104
module_jars = environment.module_path_jars
103105
if not module_jars:
104106
_err_console.print("[red]No JARs on module-path[/]")
105-
_err_console.print("[dim]TIP: Use 'jgo info classpath' to see classpath JARs[/]")
107+
_err_console.print(
108+
"[dim]TIP: Use 'jgo info classpath' to see classpath JARs[/]"
109+
)
106110
return
107111

108112
# Print one module-path element per line (raw output, no Rich formatting)
@@ -136,7 +140,9 @@ def print_main_classes(environment: Environment) -> None:
136140
return
137141

138142
# Print results grouped by JAR
139-
_console.print(f"\n[bold]Found {sum(len(v) for v in main_classes_by_jar.values())} classes with main methods:[/]\n")
143+
_console.print(
144+
f"\n[bold]Found {sum(len(v) for v in main_classes_by_jar.values())} classes with main methods:[/]\n"
145+
)
140146

141147
for jar_name, main_classes in sorted(main_classes_by_jar.items()):
142148
_console.print(f"[cyan]{jar_name}[/]:")
@@ -228,7 +234,9 @@ def print_java_info(environment: Environment) -> None:
228234
if environment.has_classpath:
229235
_console.print(f"[bold]Class-path JARs:[/] {len(environment.class_path_jars)}")
230236
if environment.has_modules:
231-
_console.print(f"[bold]Module-path JARs:[/] {len(environment.module_path_jars)}")
237+
_console.print(
238+
f"[bold]Module-path JARs:[/] {len(environment.module_path_jars)}"
239+
)
232240
_console.print(f"[bold]Total JARs:[/] {len(jar_files)}\n")
233241

234242
# Analyze each JAR

src/jgo/env/jar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,9 @@ def has_main_method(class_bytes: bytes) -> bool:
697697
pos += 2
698698
if pos + length > len(class_bytes):
699699
return False
700-
utf8_str = class_bytes[pos : pos + length].decode("utf-8", errors="replace")
700+
utf8_str = class_bytes[pos : pos + length].decode(
701+
"utf-8", errors="replace"
702+
)
701703
pos += length
702704
constant_pool.append(("Utf8", utf8_str))
703705
elif tag in (7, 8, 16, 19, 20): # 2-byte entries
@@ -867,4 +869,3 @@ def find_main_classes(jar_path: Path) -> list[str]:
867869
pass
868870

869871
return sorted(main_classes)
870-

src/jgo/util/platform.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Provides platform-aware functions that can be easily mocked in tests.
55
"""
66

7-
import os
87
from pathlib import Path
98

109

tests/test_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Tests for GlobalSettings class and settings file loading."""
22

33
from jgo.config import GlobalSettings
4-
from jgo.util.platform import get_user_home
54

65

76
def test_xdg_config_precedence(monkeypatch, tmp_path):

0 commit comments

Comments
 (0)