File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -471,8 +471,12 @@ def ui(
471471
472472 os .environ ["PROJECT_PATH" ] = str (ctx .obj .path )
473473 if ctx .parent :
474- os .environ ["CONFIG" ] = ctx .parent .params .get ("config" ) or ""
475- os .environ ["GATEWAY" ] = ctx .parent .params .get ("gateway" ) or ""
474+ config = ctx .parent .params .get ("config" )
475+ gateway = ctx .parent .params .get ("gateway" )
476+ if config :
477+ os .environ ["CONFIG" ] = config
478+ if gateway :
479+ os .environ ["GATEWAY" ] = gateway
476480 uvicorn .run (
477481 "web.server.main:app" ,
478482 host = host ,
Original file line number Diff line number Diff line change 22
33import asyncio
44import logging
5+ import typing as t
56from functools import lru_cache
67from pathlib import Path
78
2627class Settings (BaseSettings ):
2728 project_path : Path = Path ("examples/sushi" )
2829 config : str = ""
29- gateway : str = ""
30+ gateway : t . Optional [ str ] = None
3031
3132
3233@lru_cache ()
You can’t perform that action at this time.
0 commit comments