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
Babel has inconsistent type annotations (for mypy) in the babel.support.Translations.load method.
Steps to Reproduce
The documentation mentions that babel.support.Translations.load accepts strings but also Locale objects for its locales argument: locales – the list of locales in order of preference (items in this list can be either Locale objects or locale strings)
However the code type annotations do not accept Locale objects: classmethod load(..., locales: ...str...) → ...
The library behavior indicates that it is the documentation that is correct - Locale objects are accepted by the code
Actual Results
Expected Results
Reproducibility
Tested on babel 2.12.1 with python 3.10.9 through mamba 1.3.1 on MacOS 13.2.1
Overview Description
Babel has inconsistent type annotations (for mypy) in the
babel.support.Translations.load
method.Steps to Reproduce
babel.support.Translations.load
accepts strings but also Locale objects for its locales argument:locales – the list of locales in order of preference (items in this list can be either Locale objects or locale strings)
classmethod load(..., locales: ...str...) → ...
Actual Results
Expected Results
Reproducibility
Tested on babel 2.12.1 with python 3.10.9 through mamba 1.3.1 on MacOS 13.2.1
Additional Information
Documentation available here:
https://babel.pocoo.org/en/latest/api/support.html
The text was updated successfully, but these errors were encountered: