Skip to content

Commit

Permalink
dj_database_url: make all keys optional in _DBConfig TypedDict (#7979)
Browse files Browse the repository at this point in the history
Co-authored-by: Xavier Francisco <xavier.n.francisco@gmail.com>
  • Loading branch information
XF-FW and Qu4tro authored May 29, 2022
1 parent d4eba8b commit c94fb40
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stubs/dj-database-url/dj_database_url.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c94fb40

Please sign in to comment.