From e29e0b9f1a0ba86d19bbcf54d53b234b7754eed0 Mon Sep 17 00:00:00 2001 From: Xavier Francisco Date: Sat, 28 May 2022 20:32:10 +0000 Subject: [PATCH 1/2] Fix dj_database_url required key --- stubs/dj-database-url/dj_database_url.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/dj-database-url/dj_database_url.pyi b/stubs/dj-database-url/dj_database_url.pyi index 7c9a69a6f5c5..978c7584b1ce 100644 --- a/stubs/dj-database-url/dj_database_url.pyi +++ b/stubs/dj-database-url/dj_database_url.pyi @@ -5,16 +5,16 @@ DEFAULT_ENV: str SCHEMES: dict[str, str] class _DBConfigBase(TypedDict): - NAME: str + ENGINE: str class _DBConfig(_DBConfigBase, total=False): + NAME: str 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( From 81fa2b1e6273191d155d36101c7b78e6954384ea Mon Sep 17 00:00:00 2001 From: Xavier Francisco Date: Sun, 29 May 2022 00:48:55 +0000 Subject: [PATCH 2/2] Make all keys optional --- stubs/dj-database-url/dj_database_url.pyi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stubs/dj-database-url/dj_database_url.pyi b/stubs/dj-database-url/dj_database_url.pyi index 978c7584b1ce..f719d5a165eb 100644 --- a/stubs/dj-database-url/dj_database_url.pyi +++ b/stubs/dj-database-url/dj_database_url.pyi @@ -4,10 +4,8 @@ from typing_extensions import TypedDict DEFAULT_ENV: str SCHEMES: dict[str, str] -class _DBConfigBase(TypedDict): +class _DBConfig(TypedDict, total=False): ENGINE: str - -class _DBConfig(_DBConfigBase, total=False): NAME: str USER: str PASSWORD: str