Skip to content

Commit 2b6fdac

Browse files
Use Any for ConnectionProxy attributes (#2311)
Whilst the type is generic, it is not a wrapper - `__getattr__` should not return the inner type.
1 parent 333ab05 commit 2b6fdac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django-stubs/utils/connection.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ _T = TypeVar("_T")
77

88
class ConnectionProxy(Generic[_T]):
99
def __init__(self, connections: BaseConnectionHandler[_T], alias: str) -> None: ...
10-
def __getattr__(self, item: str) -> _T: ...
11-
def __setattr__(self, name: str, value: _T) -> None: ...
10+
def __getattr__(self, item: str) -> Any: ...
11+
def __setattr__(self, name: str, value: Any) -> None: ...
1212
def __delattr__(self, name: str) -> None: ...
1313
def __contains__(self, key: str) -> bool: ...
1414
def __eq__(self, other: object) -> bool: ...

0 commit comments

Comments
 (0)