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
Looking at the API doc for e.g. format_datetime, I just noticed that it states the default value for the locale parameter is 'en_US_POSIX'. That is very misleading as it actually uses the result of babel.core.default_locale('LC_TIME') which may not be anything like en_US_POSIX (and just happens to be so on the machine which built the documentation).
This can be fixed by providing an explicit signature as first line of the docstring (which will replace the extracted one) but I don't know that this is the fix the project would expect.
Please advise.
The text was updated successfully, but these errors were encountered:
Yeah, you're correct that that's kind of misleading :( An explicit signature would be fine.
To be honest – and this is probably something that'd need to be implemented in Babel 3 – I think default_locale('LC_...') should be a lazy object that checks the current value of the envvar whenever invoked; otherwise (i.e. currently) runtime changes to the envvar won't get properly applied anyway.
I created a PR with the explicit autofunction signature. Though it only fixes the functions of the first section (Date and Time Formatting) despite the doc having other functions with an LC_TIME parameter.
Looking at the API doc for e.g. format_datetime, I just noticed that it states the default value for the
locale
parameter is'en_US_POSIX'
. That is very misleading as it actually uses the result ofbabel.core.default_locale('LC_TIME')
which may not be anything likeen_US_POSIX
(and just happens to be so on the machine which built the documentation).This can be fixed by providing an explicit signature as first line of the docstring (which will replace the extracted one) but I don't know that this is the fix the project would expect.
Please advise.
The text was updated successfully, but these errors were encountered: