Skip to content

Commit fde4fdd

Browse files
feat: update project structure
1 parent 7c3c380 commit fde4fdd

File tree

8 files changed

+35
-6
lines changed

8 files changed

+35
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
TODO.md
22
__pycache__
3-
.venv
3+
.venv
4+
leetcode_cli.egg-info

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python.analysis.autoImportCompletions": true,
3+
"python.analysis.typeCheckingMode": "basic"
4+
}

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
typer
22
requests
3-
gql[all]
3+
gql[all]
4+
setuptools

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name="leetcode-cli",
5+
version="0.1.0",
6+
packages=find_packages(),
7+
install_requires=[
8+
"typer",
9+
"requests",
10+
"gql[all]"
11+
],
12+
entry_points={
13+
"console_scripts": [
14+
"lc=src.main:app",
15+
],
16+
}
17+
)

src/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
from .commands.show import show
22
from .commands.details import details
3+
from .server.api import fetch_problem_list
34

4-
__all__ = ['show', 'details']
5+
__version__ = "0.1.0"
6+
7+
__all__ = ["show", "details", "fetch_problem_list"]

src/commands/__init__.py

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

src/commands/login.py

Whitespace-only changes.

src/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import typer
2-
from commands.show import show
3-
from src.commands.details import details
2+
from src import show, details
43

54
app = typer.Typer()
65

76
app.command()(show)
87
app.command()(details)
98

109
if __name__ == "__main__":
11-
app()
10+
app()

0 commit comments

Comments
 (0)