Skip to content

Commit 3191c1a

Browse files
XF-FWQu4tro
andauthored
Add stubs for dj-database-url (#7972)
Co-authored-by: Xavier Francisco <[email protected]>
1 parent 1eef736 commit 3191c1a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

pyrightconfig.stricter.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"stubs/commonmark",
3131
"stubs/cryptography",
3232
"stubs/dateparser",
33+
"stubs/dj-database-url",
3334
"stubs/docutils",
3435
"stubs/Flask-SQLAlchemy",
3536
"stubs/fpdf2",

stubs/dj-database-url/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "0.5.*"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from typing import Any
2+
from typing_extensions import TypedDict
3+
4+
DEFAULT_ENV: str
5+
SCHEMES: dict[str, str]
6+
7+
class _DBConfigBase(TypedDict):
8+
NAME: str
9+
10+
class _DBConfig(_DBConfigBase, total=False):
11+
USER: str
12+
PASSWORD: str
13+
HOST: str
14+
PORT: str
15+
CONN_MAX_AGE: int
16+
OPTIONS: dict[str, Any]
17+
ENGINE: str
18+
19+
def parse(url: str, engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...) -> _DBConfig: ...
20+
def config(
21+
env: str = ..., default: str | None = ..., engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...
22+
) -> _DBConfig: ...

0 commit comments

Comments
 (0)