Skip to content

Commit 336f4f8

Browse files
committed
style: apply ruff formatting
1 parent d86408e commit 336f4f8

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

concore_cli/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ def doctor():
153153

154154

155155
@cli.command()
156-
@click.option(
157-
"--dry-run", is_flag=True, help="Preview detected config without writing"
158-
)
156+
@click.option("--dry-run", is_flag=True, help="Preview detected config without writing")
159157
@click.option("--force", is_flag=True, help="Overwrite existing config files")
160158
def setup(dry_run, force):
161159
"""Auto-detect tools and write concore config files"""

concore_cli/commands/setup.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def _detect_tool_overrides(plat_key):
3939
def _write_text(path, content, dry_run, force, console):
4040
if path.exists() and not force:
4141
console.print(
42-
f"[yellow]![/yellow] Skipping {path.name} "
43-
"(already exists; use --force)"
42+
f"[yellow]![/yellow] Skipping {path.name} (already exists; use --force)"
4443
)
4544
return True
4645
if dry_run:
@@ -71,8 +70,7 @@ def setup_concore(console, dry_run=False, force=False):
7170
if tool_overrides:
7271
tools_content = "\n".join(f"{k}={v}" for k, v in tool_overrides) + "\n"
7372
wrote_any = (
74-
_write_text(tools_file, tools_content, dry_run, force, console)
75-
or wrote_any
73+
_write_text(tools_file, tools_content, dry_run, force, console) or wrote_any
7674
)
7775
else:
7876
console.print("[yellow]![/yellow] No tool paths detected for concore.tools")
@@ -81,18 +79,16 @@ def setup_concore(console, dry_run=False, force=False):
8179
if docker_command:
8280
sudo_content = f"{docker_command}\n"
8381
wrote_any = (
84-
_write_text(sudo_file, sudo_content, dry_run, force, console)
85-
or wrote_any
82+
_write_text(sudo_file, sudo_content, dry_run, force, console) or wrote_any
8683
)
8784
else:
88-
console.print("[yellow]![/yellow] Docker/Podman not detected; not writing concore.sudo")
85+
console.print(
86+
"[yellow]![/yellow] Docker/Podman not detected; not writing concore.sudo"
87+
)
8988

9089
octave_file = Path(concore_path) / "concore.octave"
9190
if octave_found:
92-
wrote_any = (
93-
_write_text(octave_file, "", dry_run, force, console)
94-
or wrote_any
95-
)
91+
wrote_any = _write_text(octave_file, "", dry_run, force, console) or wrote_any
9692
else:
9793
console.print("[dim]-[/dim] Octave not detected; not writing concore.octave")
9894

@@ -104,4 +100,4 @@ def setup_concore(console, dry_run=False, force=False):
104100
console.print("[green]Dry run complete.[/green]")
105101
else:
106102
console.print("[green]Setup complete.[/green]")
107-
return True
103+
return True

0 commit comments

Comments
 (0)