Repository navigation
Reject non-ASCII letters in Spanish identifiers - #576
Open
prathamchoksi wants to merge 1 commit into
Open
prathamchoksi wants to merge 1 commit into
prathamchoksi wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #575.
Check the complete Spanish identifier for ASCII before uppercase conversion. Currently
00000038\u017fand00000038\u00dfpass NIF validation, and\u017f0000000Jpasses CIF validation. The sharp-s case expands into two letters, but indexing only the first one still accepts the malformed value. NIE and the DOI dispatcher are affected too.Move the existing ASCII restriction from the numeric body to the complete original value. Checksums and existing ASCII case handling remain unchanged. Eight new regressions fail on master and pass with the fix, with valid ASCII and lowercase-check-letter controls.
Validation: 1,582 tests including source doctests pass on Python 3.11 and 3.14. Tox lint and strict Pyright pass, along with Ruff format checks and Bandit. Python 3.12/3.13 are left to CI. Codex assisted with investigation, implementation, and testing.