From f5f79f181d491713448952d9f371ea1ad5c15c62 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Wed, 1 Jun 2022 16:52:19 +0100 Subject: [PATCH] `dj-database-url`: Add missing fields to `_DBConfig` TypedDict (#8008) Co-authored-by: Alex Waygood --- stubs/dj-database-url/dj_database_url.pyi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/stubs/dj-database-url/dj_database_url.pyi b/stubs/dj-database-url/dj_database_url.pyi index f719d5a16..353a0a5c4 100644 --- a/stubs/dj-database-url/dj_database_url.pyi +++ b/stubs/dj-database-url/dj_database_url.pyi @@ -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(