Skip to content

Commit 6f9a886

Browse files
feat: mock commands
1 parent dedbba5 commit 6f9a886

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
TODO.md
1+
TODO.md
2+
__pycache__
3+
.venv

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
typer

src/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .commands.show import show
2+
from .commands.list import list
3+
4+
__all__ = ['show', 'list']

src/commands/list.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import typer
2+
3+
def list():
4+
"""List all available LeetCode problems."""
5+
typer.echo("Fetching problem list...")

src/commands/show.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import typer
2+
3+
def show(problem_id: int):
4+
"""Show details of a specific problem."""
5+
typer.echo(f"Fetching details for problem {problem_id}...")

src/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import typer
2+
from commands.show import show
3+
from commands.list import list
4+
5+
app = typer.Typer()
6+
7+
app.command()(show)
8+
app.command()(list)
9+
10+
if __name__ == "__main__":
11+
app()

0 commit comments

Comments
 (0)