Skip to content

Commit efdcaa2

Browse files
committed
fixing bug with default root argument in some piccolo commands
1 parent 5641c1a commit efdcaa2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

piccolo/apps/app/commands/new.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717

1818

19-
def new_app(app_name: str, root: str = ""):
19+
def new_app(app_name: str, root: str = "."):
2020
print(f"Creating {app_name} app ...")
2121

2222
app_root = os.path.join(root, app_name)
@@ -50,7 +50,7 @@ def new_app(app_name: str, root: str = ""):
5050
pass
5151

5252

53-
def new(app_name: str, root: str = ""):
53+
def new(app_name: str, root: str = "."):
5454
"""
5555
Creates a new Piccolo app.
5656

piccolo/apps/asgi/commands/new.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_server() -> str:
3535
return SERVERS[int(server)]
3636

3737

38-
def new(root: str = ""):
38+
def new(root: str = "."):
3939
"""
4040
Create a basic ASGI app, including Piccolo, routing, and an admin.
4141

piccolo/apps/project/commands/new.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818

1919

20-
def new_piccolo_conf(engine_name: str, force: bool = False, root: str = ""):
20+
def new_piccolo_conf(engine_name: str, force: bool = False, root: str = "."):
2121
print("Creating new piccolo_conf file ...")
2222

2323
file_path = os.path.join(root, "piccolo_conf.py")
@@ -36,7 +36,7 @@ def new_piccolo_conf(engine_name: str, force: bool = False, root: str = ""):
3636
f.write(file_contents)
3737

3838

39-
def new(engine: str = "postgres", force: bool = False, root: str = ""):
39+
def new(engine: str = "postgres", force: bool = False, root: str = "."):
4040
"""
4141
Creates a new Piccolo project file (piccolo_conf.py).
4242

0 commit comments

Comments
 (0)