Skip to content

Commit 79ff5f5

Browse files
derek73claude
andcommitted
docs: reference lists members in source order; strip_bidi self-contained
autodoc's default alphabetical member sort scrambled the deliberate field ordering (strip_bidi rendered before strip_emoji, orphaning its 'the same way' reference; Lexicon's vocabulary grouping interleaved). autodoc_member_order = 'bysource' matches the codebase's declaration-order-is-canonical rule and the customize.rst table; the strip_bidi doc is also now self-contained regardless of ordering. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4e657a8 commit 79ff5f5

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
'sphinx.ext.viewcode',
3737
]
3838

39+
# Declaration order is canonical in this codebase (Role order drives the
40+
# seven-field order everywhere), so the reference lists members in
41+
# source order, not alphabetically -- Lexicon's vocabulary grouping and
42+
# Policy's field ordering match the customize.rst table.
43+
autodoc_member_order = 'bysource'
44+
3945
# Add any paths that contain templates here, relative to this directory.
4046
templates_path = ['_templates']
4147

nameparser/_policy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ class Policy:
9595
#: field, or rendered view. The original string keeps them (input
9696
#: is never modified -- spans stay true).
9797
strip_emoji: bool = True
98-
#: Excludes bidirectional control characters from tokenization the
99-
#: same way.
98+
#: Excludes bidirectional control characters from tokenization:
99+
#: they appear in no token, field, or rendered view; the original
100+
#: string keeps them.
100101
strip_bidi: bool = True # =False replaces v1's opt-out CONSTANTS.regexes.bidi = False
101102

102103
# in the class body so @dataclass(slots=True) keeps them

0 commit comments

Comments
 (0)