Skip to content

Commit

Permalink
Allow timedelta type for session.set_expiry() argument (#2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlazar-endear authored Mar 12, 2024
1 parent 2baacf6 commit 3d5b517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django-stubs/contrib/sessions/backends/base.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timedelta
from typing import Any

VALID_KEY_CHARS: Any
Expand Down Expand Up @@ -37,7 +37,7 @@ class SessionBase(dict[str, Any]):
def get_session_cookie_age(self) -> int: ...
def get_expiry_age(self, **kwargs: Any) -> int: ...
def get_expiry_date(self, **kwargs: Any) -> datetime: ...
def set_expiry(self, value: datetime | int | None) -> None: ...
def set_expiry(self, value: datetime | timedelta | int | None) -> None: ...
def get_expire_at_browser_close(self) -> bool: ...
def flush(self) -> None: ...
def cycle_key(self) -> None: ...
Expand Down

0 comments on commit 3d5b517

Please sign in to comment.