mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 00:31:14 +00:00
change config load method to support custom configs
This commit is contained in:
@ -29,7 +29,7 @@ def get_asgi():
|
||||
return driver.asgi
|
||||
|
||||
|
||||
def init(*, _env_file=None, **kwargs):
|
||||
def init(*, _env_file: Optional[str] = None, **kwargs):
|
||||
global _driver
|
||||
env = Env()
|
||||
config = Config(**kwargs, _env_file=_env_file or f".env.{env.environment}")
|
||||
|
Reference in New Issue
Block a user