8000 Support spaces in BIC codes · AmarisAI/python-stdnum@c611b27 · GitHub
[go: up one dir, main page]

Skip to content

Commit c611b27

Browse files
committed
Support spaces in BIC codes
BIC codes are sometimes written in a space-separated form this correctly cleans the spaces for compact representation.
1 parent 5fd1ae0 commit c611b27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdnum/bic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
3131
>>> validate('AGRIFRPP882')
3232
'AGRIFRPP882'
33+
>>> validate('ABNA BE 2A')
34+
'ABNABE2A'
3335
>>> validate('AGRIFRPP')
3436
'AGRIFRPP'
3537
>>> validate('AGRIFRPP8')
@@ -56,7 +58,7 @@
5658
def compact(number):
5759
"""Convert the number to the minimal representation. This strips the
5860
number of any surrounding whitespace."""
59-
return clean(number).strip().upper()
61+
return clean(number, ' ').strip().upper()
6062

6163

6264
def validate(number):

0 commit comments

Comments
 (0)
0