dj-database-url: Add missing fields to _DBConfig TypedDict (#8008)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Tom Parker-Shemilt
2022-06-01 16:52:19 +01:00
committed by GitHub
parent 6355cba923
commit f5f79f181d

View File

@@ -4,15 +4,21 @@ from typing_extensions import TypedDict
DEFAULT_ENV: str
SCHEMES: dict[str, str]
# From https://docs.djangoproject.com/en/4.0/ref/settings/#databases
class _DBConfig(TypedDict, total=False):
ENGINE: str
NAME: str
USER: str
PASSWORD: str
HOST: str
PORT: str
ATOMIC_REQUESTS: bool
AUTOCOMMIT: bool
CONN_MAX_AGE: int
OPTIONS: dict[str, Any]
DISABLE_SERVER_SIDE_CURSORS: bool
ENGINE: str
HOST: str
NAME: str
OPTIONS: dict[str, Any] | None
PASSWORD: str
PORT: str
TEST: dict[str, Any]
TIME_ZONE: str
USER: str
def parse(url: str, engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...) -> _DBConfig: ...
def config(