mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
Restore Python 3.7 compatibility (#945)
django-stubs still supports Python 3.7, but the `/` positional-only parameter syntax is supported only in Python 3.8+. Not sure why this error wasn't caught in CI.
This commit is contained in:
@@ -161,9 +161,9 @@ class QueryDict(MultiValueDict[str, str]):
|
||||
def appendlist(self, key: Union[str, bytes], value: Union[str, bytes]) -> None: ...
|
||||
# Fake signature (because *args is used in source, but it fails with more that 1 argument)
|
||||
@overload
|
||||
def pop(self, key: Union[str, bytes], /) -> str: ...
|
||||
def pop(self, __key: Union[str, bytes]) -> str: ...
|
||||
@overload
|
||||
def pop(self, key: Union[str, bytes], default: Union[str, _Z] = ..., /) -> Union[str, _Z]: ...
|
||||
def pop(self, __key: Union[str, bytes], __default: Union[str, _Z] = ...) -> Union[str, _Z]: ...
|
||||
def popitem(self) -> Tuple[str, str]: ...
|
||||
def clear(self) -> None: ...
|
||||
def setdefault(self, key: Union[str, bytes], default: Union[str, bytes, None] = ...) -> str: ...
|
||||
@@ -182,9 +182,9 @@ class _ImmutableQueryDict(QueryDict):
|
||||
def appendlist(self, key: Union[str, bytes], value: Union[str, bytes]) -> NoReturn: ...
|
||||
# Fake signature (because *args is used in source, but it fails with more that 1 argument)
|
||||
@overload
|
||||
def pop(self, key: Union[str, bytes], /) -> NoReturn: ...
|
||||
def pop(self, __key: Union[str, bytes]) -> NoReturn: ...
|
||||
@overload
|
||||
def pop(self, key: Union[str, bytes], default: Union[str, _Z] = ..., /) -> NoReturn: ...
|
||||
def pop(self, __key: Union[str, bytes], __default: Union[str, _Z] = ...) -> NoReturn: ...
|
||||
def popitem(self) -> NoReturn: ...
|
||||
def clear(self) -> NoReturn: ...
|
||||
def setdefault(self, key: Union[str, bytes], default: Union[str, bytes, None] = ...) -> NoReturn: ...
|
||||
|
||||
Reference in New Issue
Block a user