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
As you can see, the "top level" function, which can be called by the localizer's run_own_code_on parameter, suggests a default range of 1-20, but has no such default, nor does its logic enforce that value. Although the English-language function (and presumably others, haven't checked) defaults to range(1, 21), this value could hypothetically be different for a particular language.
Maintainers may recall that "top level" functions' default parameters are ignored by the localizer when successfully calling a localized function, so the only way to provide accurate defaults in these docstrings is to ensure that defaults are uniform across localizations. However, if a function has the run_own_code_on parameter, its actual contents can be executed.
Furthermore, we've done a reasonable job of keeping the top-level signatures' default values consistent with their expected behavior in localized versions, so that users reading them via autocomplete have an idea what to expect.
Either the docstring should change to reflect the function's default value, or the function's default value should be changed to reflect the localized functions' defaults.
The text was updated successfully, but these errors were encountered:
Excerpt from the definition and docstring:
As you can see, the "top level" function, which can be called by the localizer's
run_own_code_on
parameter, suggests a default range of 1-20, but has no such default, nor does its logic enforce that value. Although the English-language function (and presumably others, haven't checked) defaults torange(1, 21)
, this value could hypothetically be different for a particular language.Maintainers may recall that "top level" functions' default parameters are ignored by the localizer when successfully calling a localized function, so the only way to provide accurate defaults in these docstrings is to ensure that defaults are uniform across localizations. However, if a function has the
run_own_code_on
parameter, its actual contents can be executed.Furthermore, we've done a reasonable job of keeping the top-level signatures' default values consistent with their expected behavior in localized versions, so that users reading them via autocomplete have an idea what to expect.
Either the docstring should change to reflect the function's default value, or the function's default value should be changed to reflect the localized functions' defaults.
The text was updated successfully, but these errors were encountered: