Skip to content

Add support for ISO6346#10

Closed
sharoonthomas wants to merge 1 commit into
arthurdejong:masterfrom
sharoonthomas:master
Closed

Add support for ISO6346#10
sharoonthomas wants to merge 1 commit into
arthurdejong:masterfrom
sharoonthomas:master

Conversation

@sharoonthomas

Copy link
Copy Markdown
Contributor

* Adds validation and creation of check digit for ISO6346 codes
* Closes arthurdejong#9
@arthurdejong

Copy link
Copy Markdown
Owner

Thanks for the pull request. I've taken your code and made a few modifications to change it into 85dd6f2.

The changes I've made were mostly for API consistency:

  • removed the documentation (normally only generated during release unless something interesting is actually documented)
  • changed the module docstring (the first line is used by stdnum.util as one of the steps to update documentation)
  • use stdnum.util.clean() to make a compact() function (this does all the right things with all weird values that you can through at it)
  • rewrote calc_check_digit() (renamed from calculate_check_digit() to match other modules) to be simpler
  • validate() should return a compact representation of the number

Thanks for your contribution.

cedk pushed a commit to cedk/python-stdnum that referenced this pull request Dec 18, 2025
cedk pushed a commit to cedk/python-stdnum that referenced this pull request Dec 18, 2025
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.

ISO 6346 validation

2 participants