Skip to content

Commit 14b8a7d

Browse files
Fix pre-commit formatting issues
- Fix trailing comma in update command function signature - Ensure all pre-commit checks pass
1 parent 0ee0a78 commit 14b8a7d

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/codegen/cli/cli.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
install(show_locals=True)
1414

1515
# Create the main Typer app
16-
main = typer.Typer(
17-
name="codegen",
18-
help="Codegen CLI - Transform your code with AI.",
19-
rich_markup_mode="rich"
20-
)
16+
main = typer.Typer(name="codegen", help="Codegen CLI - Transform your code with AI.", rich_markup_mode="rich")
2117

2218
# Add commands to the main app
2319
main.add_typer(init_command, name="init")

src/codegen/cli/commands/config/main.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ def get_config(key: str = typer.Argument(..., help="Configuration key to get")):
9090

9191

9292
@config_command.command(name="set")
93-
def set_config(
94-
key: str = typer.Argument(..., help="Configuration key to set"),
95-
value: str = typer.Argument(..., help="Configuration value to set")
96-
):
93+
def set_config(key: str = typer.Argument(..., help="Configuration key to set"), value: str = typer.Argument(..., help="Configuration value to set")):
9794
"""Set a configuration value and write to .env"""
9895
config = _get_user_config()
9996
if not config.has_key(key):

src/codegen/cli/commands/init/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
from pathlib import Path
32
from typing import Optional
43

@@ -12,19 +11,20 @@
1211
# Create a Typer app for the init command
1312
init_command = typer.Typer(help="Initialize or update the Codegen folder.")
1413

14+
1515
@init_command.command()
1616
def init(
1717
path: Optional[str] = typer.Option(None, help="Path within a git repository. Defaults to the current directory."),
1818
token: Optional[str] = typer.Option(None, help="Access token for the git repository. Required for full functionality."),
1919
language: Optional[str] = typer.Option(None, help="Override automatic language detection (python or typescript)"),
20-
fetch_docs: bool = typer.Option(False, "--fetch-docs", help="Fetch docs and examples (requires auth)")
20+
fetch_docs: bool = typer.Option(False, "--fetch-docs", help="Fetch docs and examples (requires auth)"),
2121
):
2222
"""Initialize or update the Codegen folder."""
2323
# Validate language option
2424
if language and language.lower() not in ["python", "typescript"]:
2525
rich.print(f"[bold red]Error:[/bold red] Invalid language '{language}'. Must be 'python' or 'typescript'.")
2626
raise typer.Exit(1)
27-
27+
2828
# Print a message if not in a git repo
2929
path = Path.cwd() if path is None else Path(path)
3030
repo_path = get_git_root_path(path)

src/codegen/cli/commands/login/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from typing import Optional
2+
23
import typer
34

45
from codegen.cli.auth.login import login_routine
@@ -7,6 +8,7 @@
78
# Create a Typer app for the login command
89
login_command = typer.Typer(help="Store authentication token.")
910

11+
1012
@login_command.command()
1113
def login(token: Optional[str] = typer.Option(None, help="API token for authentication")):
1214
"""Store authentication token."""

src/codegen/cli/commands/logout/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Create a Typer app for the logout command
77
logout_command = typer.Typer(help="Clear stored authentication token.")
88

9+
910
@logout_command.command()
1011
def logout():
1112
"""Clear stored authentication token."""

src/codegen/cli/commands/profile/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ def requires_init(func):
1313
"""Simple stub decorator that does nothing."""
1414
return func
1515

16+
1617
# Create a Typer app for the profile command
1718
profile_command = typer.Typer(help="Display information about the currently authenticated user.")
1819

20+
1921
@profile_command.command()
2022
@requires_auth
2123
@requires_init

src/codegen/cli/commands/style_debug/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Create a Typer app for the style-debug command
1010
style_debug_command = typer.Typer(help="Debug command to visualize CLI styling (spinners, etc).")
1111

12+
1213
@style_debug_command.command()
1314
def style_debug(text: str = typer.Option("Loading...", help="Text to show in the spinner")):
1415
"""Debug command to visualize CLI styling (spinners, etc)."""

src/codegen/cli/commands/update/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ def install_package(package: str, *args: str) -> None:
3434
# Create a Typer app for the update command
3535
update_command = typer.Typer(help="Update Codegen to the latest or specified version")
3636

37+
3738
@update_command.command()
3839
def update(
3940
list_: bool = typer.Option(False, "--list", "-l", help="List all supported versions of the codegen"),
40-
version: Optional[str] = typer.Option(None, "--version", "-v", help="Update to a specific version of the codegen")
41+
version: Optional[str] = typer.Option(None, "--version", "-v", help="Update to a specific version of the codegen"),
4142
):
4243
"""Update Codegen to the latest or specified version
4344

0 commit comments

Comments
 (0)