]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Fix up some docstrings
authorAarni Koskela <akx@iki.fi>
Mon, 13 Jan 2025 11:16:18 +0000 (13:16 +0200)
committerAarni Koskela <akx@iki.fi>
Tue, 14 Jan 2025 07:52:31 +0000 (09:52 +0200)
babel/core.py
babel/dates.py
babel/messages/catalog.py
babel/messages/frontend.py
babel/messages/jslexer.py
babel/numbers.py

index 7df32c9882285d424bb4fdd08fa3373bb6ab8de8..d03be0d9d8efabec698d9a8cbc040be1ad4bdefa 100644 (file)
@@ -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)
index 8c82d72d4855aecf97c35840d713215672b915f1..740e8495546dcf708f8a8036963d4c6c73551f49 100644 (file)
@@ -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
     """
index 67d4dbe23977d15a9a6f98a3558b4a9fc553f85d..331ff563a8d38516457766c630bb2fb6289f5577 100644 (file)
@@ -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()
index 9017ec5a8b2646cf2c71d4ecef3c184bf839b1c5..442703ff9a8e92b19ba378b5a78a711094fe10f6 100644 (file)
@@ -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 = []
index 31f0582e3bd523db532e6c09ad8a7013aebba654..c7cf0577cc41597d6a3be54ccfae28126f978138 100644 (file)
@@ -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
index aed9aa4c4c60616c2576ae697cf4b5d452319aba..701e288e42a4a599838c87deda48167406a41106 100644 (file)
@@ -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.