Skip to content

Exact match Chinese and Arabic names in get_iso3_country_code_fuzzy - #93

Merged
mcarans merged 1 commit into
mainfrom
fix-fuzzy-caseless-scripts
Sep 29, 2026
Merged

mcarans merged 1 commit into
mainfrom
fix-fuzzy-caseless-scripts

Conversation

@mcarans

@mcarans mcarans commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #91.

  • Run get_iso3_country_code before the isupper() check, which is always False for Chinese and Arabic, so those names now return e.g. ("JPN", True).
  • When the check fails, raise exception if one was passed rather than returning (None, False).
  • Add tests for Chinese/Arabic names and the exception case.

)

Run the exact lookup before the case check, which fails for scripts without
case, and raise exception if given when that check fails.
@github-actions

Copy link
Copy Markdown

Test Results

36 tests  ±0   36 ✅ ±0   56s ⏱️ -10s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit b6096ba. ± Comparison against base commit 3340935.

@mcarans
mcarans merged commit a2cf1df into main Sep 29, 2026
3 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 95.776% (+0.08%) from 95.692% — fix-fuzzy-caseless-scripts into main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_iso3_country_code_fuzzy returns (None, False) for Chinese and Arabic names that get_iso3_country_code matches exactly

2 participants