Skip to content

Commit 9746553

Browse files
Bury tiled.auth imports in CLI (#1212)
1 parent e86923a commit 9746553

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tiled/commandline/_serve.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import typer
77

8-
from tiled.config import Authentication, parse_configs
9-
108
serve_app = typer.Typer(no_args_is_help=True)
119

1210
SQLITE_CATALOG_FILENAME = "catalog.db"
@@ -140,6 +138,7 @@ def serve_directory(
140138
stamp_head(ALEMBIC_INI_TEMPLATE_PATH, ALEMBIC_DIR, database)
141139

142140
from ..catalog import from_uri as catalog_from_uri
141+
from ..config import Authentication
143142
from ..server.app import build_app, print_server_info
144143

145144
if keep_ext:
@@ -377,6 +376,7 @@ def serve_catalog(
377376
import urllib.parse
378377

379378
from ..catalog import from_uri
379+
from ..config import Authentication
380380
from ..server.app import build_app, print_server_info
381381

382382
parsed_database = urllib.parse.urlparse(database)
@@ -560,6 +560,7 @@ def serve_pyobject(
560560
),
561561
):
562562
"Serve a Tree instance from a Python module."
563+
from ..config import Authentication
563564
from ..server.app import build_app, print_server_info
564565
from ..utils import import_object
565566

@@ -593,6 +594,7 @@ def serve_demo(
593594
port: int = typer.Option(8000, help="Bind to a socket with this port."),
594595
):
595596
"Start a public server with example data."
597+
from ..config import Authentication
596598
from ..server.app import build_app, print_server_info
597599
from ..utils import import_object
598600

@@ -661,6 +663,8 @@ def serve_config(
661663
"Serve a Tree as specified in configuration file(s)."
662664
import os
663665

666+
from ..config import parse_configs
667+
664668
config_path = config_path or Path(os.getenv("TILED_CONFIG", "config.yml"))
665669
try:
666670
parsed_config = parse_configs(config_path)

0 commit comments

Comments
 (0)