diff --git a/stubs/dj-database-url/@tests/stubtest_allowlist.txt b/stubs/dj-database-url/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..8f296002b --- /dev/null +++ b/stubs/dj-database-url/@tests/stubtest_allowlist.txt @@ -0,0 +1,6 @@ +# Loop variable that leaks into the global namespace +dj_database_url.key + +# Many stubtest false positives for a runtime TypedDict, see https://github.com/python/mypy/issues/14983 +dj_database_url.DBConfig +dj_database_url.DBConfig.__new__ diff --git a/stubs/dj-database-url/METADATA.toml b/stubs/dj-database-url/METADATA.toml index 249b0a7c0..3ea18392d 100644 --- a/stubs/dj-database-url/METADATA.toml +++ b/stubs/dj-database-url/METADATA.toml @@ -1 +1 @@ -version = "1.2.*" +version = "1.3.*" diff --git a/stubs/dj-database-url/dj_database_url.pyi b/stubs/dj-database-url/dj_database_url.pyi index c0d3f5672..4537ae4bf 100644 --- a/stubs/dj-database-url/dj_database_url.pyi +++ b/stubs/dj-database-url/dj_database_url.pyi @@ -6,7 +6,7 @@ DEFAULT_ENV: str SCHEMES: dict[str, str] # From https://docs.djangoproject.com/en/4.0/ref/settings/#databases -class _DBConfig(TypedDict, total=False): +class DBConfig(TypedDict, total=False): ATOMIC_REQUESTS: bool AUTOCOMMIT: bool CONN_MAX_AGE: int @@ -28,7 +28,7 @@ def parse( conn_health_checks: bool = ..., ssl_require: bool = ..., test_options: dict[Incomplete, Incomplete] | None = ..., -) -> _DBConfig: ... +) -> DBConfig: ... def config( env: str = ..., default: str | None = ..., @@ -37,4 +37,4 @@ def config( conn_health_checks: bool = ..., ssl_require: bool = ..., test_options: dict[Incomplete, Incomplete] | None = ..., -) -> _DBConfig: ... +) -> DBConfig: ...