Skip to content

Commit b49239d

Browse files
derek73claude
andcommitted
Make the SetManager doctest reprs addition-proof
Four customize.rst doctests pinned the titles set's LAST element ('zoologist') through the ELLIPSIS form -- #269's non-Latin entries sort after it and broke all four. The ellipsis now swallows to the closing brace, so vocabulary additions cannot break the docs again (the constant-content rule, applied to doctests). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b2ce60a commit b49239d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/customize.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ constant so that "Hon" can be parsed as a first name.
371371
maiden: ''
372372
]>
373373
>>> constants.titles.remove('hon')
374-
SetManager({'10th', ..., 'zoologist'})
374+
SetManager({'10th', ...})
375375
>>> hn = HumanName("Hon Solo", constants=constants)
376376
>>> hn
377377
<HumanName : [
@@ -416,7 +416,7 @@ making them lower case and removing periods.
416416
>>> from nameparser.config import Constants
417417
>>> constants = Constants()
418418
>>> constants.titles.add('dean', 'Chemistry')
419-
SetManager({'10th', ..., 'zoologist'})
419+
SetManager({'10th', ...})
420420
>>> hn = HumanName("Assoc Dean of Chemistry Robert Johns", constants=constants)
421421
>>> hn
422422
<HumanName : [
@@ -448,7 +448,7 @@ instance is safe to read concurrently, e.g. parsing names on multiple threads.
448448
>>> from nameparser import HumanName
449449
>>> instance = HumanName("")
450450
>>> instance.C.titles.add('dean')
451-
SetManager({'10th', ..., 'zoologist'})
451+
SetManager({'10th', ...})
452452
>>> other_instance = HumanName("Dean Robert Johns")
453453
>>> other_instance # Dean parses as title
454454
<HumanName : [
@@ -491,7 +491,7 @@ values with the behavior described above.
491491
>>> instance.has_own_config
492492
False
493493
>>> instance.C.titles.add('dean')
494-
SetManager({'10th', ..., 'zoologist'})
494+
SetManager({'10th', ...})
495495
>>> other_instance = HumanName("Dean Robert Johns", Constants()) # <-- fresh, private config
496496
>>> other_instance
497497
<HumanName : [

0 commit comments

Comments
 (0)