Rename first_name_prefixes to bound_first_names#203
Merged
Conversation
The name first_name_prefixes clashed with the project convention that "prefixes" (PREFIXES, NON_FIRST_NAME_PREFIXES) refer to last-name particles. Since this Constants attribute hasn't been released yet (added in the unreleased 1.3.0), rename it and its helpers (is_first_name_prefix, _join_first_name_prefix) to bound_first_names / is_bound_first_name / _join_bound_first_name across config, parser, tests, and docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
first_name_prefixeswas named in a way that clashes with the project convention that "prefix" (PREFIXES,NON_FIRST_NAME_PREFIXES) refers to last-name particles — this attribute is actually about bound given-name prefixes.FIRST_NAME_PREFIXES→BOUND_FIRST_NAMES,first_name_prefixes.py→bound_first_names.py, theConstants.first_name_prefixesattribute/kwarg →bound_first_names, and the parser helpersis_first_name_prefix/_join_first_name_prefix→is_bound_first_name/_join_bound_first_name.docs/customize.rst,docs/release_log.rst,AGENTS.md, and test files (including a file rename) to match.NON_FIRST_NAME_PREFIXESis untouched — it correctly refers to last-name-side prefixes and still fits the naming convention.Test plan
python3 -m pytest -q— 1236 passed, 4 skipped, 22 xfailed