dj_database_url: make all keys optional in _DBConfig TypedDict (#7979)

Co-authored-by: Xavier Francisco <xavier.n.francisco@gmail.com>
This commit is contained in:
Xavier Francisco
2022-05-29 11:25:16 +00:00
committed by GitHub
parent d4eba8b5ce
commit c94fb408b7

View File

@@ -4,17 +4,15 @@ from typing_extensions import TypedDict
DEFAULT_ENV: str
SCHEMES: dict[str, str]
class _DBConfigBase(TypedDict):
class _DBConfig(TypedDict, total=False):
ENGINE: str
NAME: str
class _DBConfig(_DBConfigBase, total=False):
USER: str
PASSWORD: str
HOST: str
PORT: str
CONN_MAX_AGE: int
OPTIONS: dict[str, Any]
ENGINE: str
def parse(url: str, engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...) -> _DBConfig: ...
def config(