Skip to content

Commit

Permalink
Fix overload
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Aug 29, 2024
1 parent 59d1d78 commit 4e7967d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions django-stubs/contrib/sessions/backends/base.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from _collections_abc import dict_items, dict_keys, dict_values
from collections.abc import Iterable
from datetime import datetime, timedelta
from typing import Any, TypeVar, overload
from typing import Any, overload

from _typeshed import SupportsKeysAndGetItem

Expand All @@ -10,8 +10,6 @@ VALID_KEY_CHARS: Any
class CreateError(Exception): ...
class UpdateError(Exception): ...

_T = TypeVar("_T")

class SessionBase(dict[str, Any]):
TEST_COOKIE_NAME: str
TEST_COOKIE_VALUE: str
Expand All @@ -27,13 +25,9 @@ class SessionBase(dict[str, Any]):
@overload
async def aget(self, key: str, default: Any) -> Any: ...
@overload
async def aget(self, key: str, default: _T) -> Any | _T: ... # type: ignore[misc]
@overload
async def apop(self, key: str) -> Any: ...
@overload
async def apop(self, key: str, default: Any) -> Any: ...
@overload
async def apop(self, key: str, default: _T) -> Any | _T: ... # type: ignore[misc]
async def asetdefault(self, key: str, value: Any) -> Any: ...
def set_test_cookie(self) -> None: ...
async def aset_test_cookie(self) -> None: ...
Expand Down

0 comments on commit 4e7967d

Please sign in to comment.