Skip to content

fix(en_IN, es_MX, zh_CN): inherit en_GB bank provider so GB iban() is valid#2413

Open
CedricConday wants to merge 2 commits into
joke2k:masterfrom
CedricConday:fix/iban-gb
Open

fix(en_IN, es_MX, zh_CN): inherit en_GB bank provider so GB iban() is valid#2413
CedricConday wants to merge 2 commits into
joke2k:masterfrom
CedricConday:fix/iban-gb

Conversation

@CedricConday

@CedricConday CedricConday commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

These locales fall back to GB IBANs but lacked a correct bank provider, producing invalid IBANs. They now inherit the en_GB bank provider.

Verified against python-stdnum (reference IBAN validator): 300/300 generated IBANs pass stdnum.iban.validate(). Existing tests/providers/test_bank.py suite passes. Includes a regression test.


AI disclosure: Prepared with AI assistance (Claude / Claude Code). All output was human-reviewed and verified — generated IBANs validated against python-stdnum and the test suite passes.

…cales type-check

en_IN, es_MX and zh_CN now inherit en_GB.Provider; en_GB's untyped 'banks'
tuple was inferred as fixed-length, making those subclasses' differing bank
lists fail mypy as incompatible overrides. Annotating the base as
Tuple[str, ...] resolves it.
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.

1 participant