Skip to content

Commit

Permalink
Accurately infer capfirst() None return (#1842)
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr authored Nov 16, 2023
1 parent f82bf98 commit 706f41f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django-stubs/utils/text.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ from django.db.models.base import Model
from django.utils.functional import SimpleLazyObject, _StrOrPromise

_StrOrPromiseT = TypeVar("_StrOrPromiseT", bound=_StrOrPromise)
_StrOrPromiseOrNoneT = TypeVar("_StrOrPromiseOrNoneT", bound=_StrOrPromise | None)

def capfirst(x: _StrOrPromiseT | None) -> _StrOrPromiseT | None: ...
def capfirst(x: _StrOrPromiseOrNoneT) -> _StrOrPromiseOrNoneT: ...

re_words: Pattern[str]
re_chars: Pattern[str]
Expand Down

0 comments on commit 706f41f

Please sign in to comment.