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
fuzzy – If the skeleton is not found, allow choosing a skeleton that’s close enough to it.
The way I read it is that as long as I pass fuzzy=True (which is the default) a skeleton should always be found and I should not need to worry about KeyErrors in that case.
Even the example in the docs makes it seem a KeyError is only thrown with fuzzy=False:
format_skeleton('yMMd', t, fuzzy=False, locale='fi') # yMMd is not in the Finnish locale, an error is thrown
If this is the expected behaviour, I think the docs should state that explicitly. If not, I would suggest adding allow_different_fields=True to the underlying match_skeleton() call.
Additional Information
Babel version: 2.15
The text was updated successfully, but these errors were encountered:
Overview Description
When using
format_skeleton
, aKeyError
is raised despite usingfuzzy=True
.Steps to Reproduce
From the docs:
The way I read it is that as long as I pass
fuzzy=True
(which is the default) a skeleton should always be found and I should not need to worry aboutKeyError
s in that case.Even the example in the docs makes it seem a
KeyError
is only thrown withfuzzy=False
:If this is the expected behaviour, I think the docs should state that explicitly. If not, I would suggest adding
allow_different_fields=True
to the underlyingmatch_skeleton()
call.Additional Information
Babel version:
2.15
The text was updated successfully, but these errors were encountered: