Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information