lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 2.2-9-g30aaa38

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 2.2-9-g30aaa38



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  30aaa3879ea336ec7c9f424d0f4369dfc0d3a702 (commit)
      from  23be163d33c1444d499b95559a6aceac2064bff4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=30aaa3879ea336ec7c9f424d0f4369dfc0d3a702

commit 30aaa3879ea336ec7c9f424d0f4369dfc0d3a702
Author: Tuukka Tolvanen <ttolvanen@holvi.com>
Date:   Wed Aug 12 03:01:07 2026 +0300

    Strip comma instead of keyboard-adjacent m when compacting CID
    
    Fixes 099078e
    
    Closes https://github.com/arthurdejong/python-stdnum/pull/508

diff --git a/stdnum/eu/at_02.py b/stdnum/eu/at_02.py
index 610ef61..60b5164 100644
--- a/stdnum/eu/at_02.py
+++ b/stdnum/eu/at_02.py
@@ -32,6 +32,8 @@ contains the country-specific identifier.
 'ES2300047690558N'
 >>> compact('ES++()+23ZZZ4//7690558N')
 'ES23ZZZ47690558N'
+>>> compact('mt50zzz670169305t') # EPC262-08 Version 12.0 / 8.1.15 Malta, 
example identifier, lowercased
+'MT50ZZZ670169305T'
 >>> calc_check_digits('ESXXZZZ47690558N')
 '23'
 """
@@ -50,7 +52,7 @@ _alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 def compact(number: str) -> str:
     """Convert the AT-02 number to the minimal representation. This strips
     the number of any valid separators and removes invalid characters."""
-    return clean(number, ' -/?:().m\'+"').strip().upper()
+    return clean(number, ' -/?:().,\'+"').strip().upper()
 
 
 def _to_base10(number: str) -> str:

-----------------------------------------------------------------------

Summary of changes:
 stdnum/eu/at_02.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
python-stdnum