Skip to content

Commit 13d989b

Browse files
committed
fix reference to module config in docs
1 parent 659cfd5 commit 13d989b

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/customize.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Changing the Predefined Variables
1212
+++++++++++++++++++++++++++++++++
1313

1414
There are a few ways to adjust the parser configuration depending on your needs.
15-
The config is available via ``from nameparser.config import constants`` or on the
15+
The config is available via ``from nameparser.config import CONSTANTS`` or on the
1616
``C`` attribute of a ``HumanName`` instance, e.g. ``hn.C``. Take a look
1717
at the :py:mod:`nameparser.config` documentation to get a better idea what they are
1818
and how they are used, but here's a quick walk through.
@@ -39,8 +39,8 @@ that "Hon" can be parsed as a first name.
3939
suffix: ''
4040
nickname: ''
4141
]>
42-
>>> from nameparser.config import constants
43-
>>> constants.titles.remove('hon')
42+
>>> from nameparser.config import CONSTANTS
43+
>>> CONSTANTS.titles.remove('hon')
4444
>>> hn = HumanName("Hon Solo")
4545
>>> hn
4646
<HumanName : [
@@ -63,8 +63,8 @@ methods and each string will be added or removed.
6363
::
6464

6565
>>> from nameparser import HumanName
66-
>>> from nameparser.config import constants
67-
>>> constants.titles.add('dean', 'Chemistry')
66+
>>> from nameparser.config import CONSTANTS
67+
>>> CONSTANTS.titles.add('dean', 'Chemistry')
6868
>>> hn = HumanName("Assoc Dean of Chemistry Robert Johns")
6969
>>> hn
7070
<HumanName : [

nameparser/config/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
::
1111
12-
>>> from nameparser.config import constants
12+
>>> from nameparser.config import CONSTANTS
1313
>>> constants.titles.remove('hon').add('chemistry','dean')
1414
1515
You can also adjust the configuration of individual instances by passing
@@ -110,7 +110,7 @@ class Constants(object):
110110
"""
111111
This class is used to hold all of the configuration for the parser.
112112
An instance of this class is available via
113-
``from nameparser.config import constants`` or on the
113+
``from nameparser.config import CONSTANTS`` or on the
114114
``C`` attribute of a :py:class:`~nameparser.parser.HumanName` instance, e.g. ``hn.C``.
115115
116116
:param set prefixes:

0 commit comments

Comments
 (0)