Skip to content

Commit 15357b5

Browse files
committed
docs: document nickname_delimiters/maiden_delimiters in Constants docstring
Not added as :param: entries since they aren't __init__ arguments (always set internally, unlike every other entry in that block) -- that would make Sphinx's generated docs imply Constants(nickname_delimiters=...) works. Documented as a plain note instead, pointing at the customization docs for the full mechanism.
1 parent be65195 commit 15357b5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

nameparser/config/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,16 @@ class Constants:
270270
:type regexes: tuple or dict
271271
:param regexes:
272272
:py:attr:`regexes` wrapped with :py:class:`TupleManager`.
273+
274+
:py:attr:`nickname_delimiters` and :py:attr:`maiden_delimiters` are not
275+
constructor arguments -- they're always set in ``__init__`` (see the
276+
comment there for the string-sentinel-vs-compiled-pattern mechanism) --
277+
but are documented here since they're the two `Constants` attributes a
278+
caller is most likely to want to look up: per-bucket
279+
:py:class:`TupleManager` collections that :py:meth:`~nameparser.parser.HumanName.parse_nicknames`
280+
consults to route delimited content into ``nickname``/``maiden``. See
281+
the "Adding Custom Nickname Delimiters" and "Routing to Maiden Name"
282+
sections of the customization docs.
273283
"""
274284

275285
prefixes = _CachedUnionMember()

0 commit comments

Comments
 (0)