From: Aarni Koskela Date: Mon, 13 Jan 2025 11:16:18 +0000 (+0200) Subject: Fix up some docstrings X-Git-Tag: v2.17.0~7^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1a888990304de4d6844bef48dbfb46bf83b39ec;p=thirdparty%2Fbabel.git Fix up some docstrings --- diff --git a/babel/core.py b/babel/core.py index 7df32c98..d03be0d9 100644 --- a/babel/core.py +++ b/babel/core.py @@ -266,6 +266,7 @@ class Locale: :param preferred: the list of locale identifiers preferred by the user :param available: the list of locale identifiers available :param aliases: a dictionary of aliases for locale identifiers + :param sep: separator for parsing; e.g. Windows tends to use '-' instead of '_'. """ identifier = negotiate_locale(preferred, available, sep=sep, aliases=aliases) diff --git a/babel/dates.py b/babel/dates.py index 8c82d72d..740e8495 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -1935,6 +1935,10 @@ def match_skeleton(skeleton: str, options: Iterable[str], allow_different_fields :type skeleton: str :param options: An iterable of other skeletons to match against :type options: Iterable[str] + :param allow_different_fields: Whether to allow a match that uses different fields + than the skeleton requested. + :type allow_different_fields: bool + :return: The closest skeleton match, or if no match was found, None. :rtype: str|None """ diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index 67d4dbe2..331ff563 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -830,6 +830,9 @@ class Catalog: :param template: the reference catalog, usually read from a POT file :param no_fuzzy_matching: whether to use fuzzy matching of message IDs + :param update_header_comment: whether to copy the header comment from the template + :param keep_user_comments: whether to keep user comments from the old catalog + :param update_creation_date: whether to copy the creation date from the template """ messages = self._messages remaining = messages.copy() diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index 9017ec5a..442703ff 100644 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -1012,6 +1012,7 @@ def parse_mapping_cfg(fileobj, filename=None): :param fileobj: a readable file-like object containing the configuration text to parse + :param filename: the name of the file being parsed, for error messages """ extractors = {} method_map = [] diff --git a/babel/messages/jslexer.py b/babel/messages/jslexer.py index 31f0582e..c7cf0577 100644 --- a/babel/messages/jslexer.py +++ b/babel/messages/jslexer.py @@ -162,6 +162,7 @@ def tokenize(source: str, jsx: bool = True, dotted: bool = True, template_string """ Tokenize JavaScript/JSX source. Returns a generator of tokens. + :param source: The JavaScript source to tokenize. :param jsx: Enable (limited) JSX parsing. :param dotted: Read dotted names as single name token. :param template_string: Support ES6 template strings diff --git a/babel/numbers.py b/babel/numbers.py index aed9aa4c..701e288e 100644 --- a/babel/numbers.py +++ b/babel/numbers.py @@ -1404,6 +1404,7 @@ class NumberPattern: :type decimal_quantization: bool :param force_frac: DEPRECATED - a forced override for `self.frac_prec` for a single formatting invocation. + :param group_separator: Whether to use the locale's number group separator. :param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn". The special value "default" will use the default numbering system of the locale. :return: Formatted decimal string.