You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support passing lazy strings to utils.text functions (#1344)
Currently, we get many of the following errors when trying to pass our Django code through mypy:
error: Argument 1 to "capfirst" has incompatible type "_StrPromise"; expected "Optional[str]" [arg-type]
Looking at the Django source code for capfirst it has been decorated with @keep_lazy_text meaning it also supports _StrPromise next to str.
I've updated the typing of all similar functions to reflect this support.
* Add bound typevar to bind output laziness to input laziness
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments