There was an error while loading. Please reload this page.
1 parent 27e0b11 commit 3ef7bccCopy full SHA for 3ef7bcc
1 file changed
src/fdlearn/resources/patterns.py
@@ -148,11 +148,12 @@ def iban_checksum(iban: str) -> str:
148
country = iban[:2]
149
bban = iban[4:]
150
moved = bban + country + "00"
151
- numeric = "".join(str(int(ch, 36)) for ch in moved)
+ numeric = ''.join(str(ord(ch) - 55) if ch.isalpha() else ch for ch in moved)
152
remainder = int(numeric) % 97
153
- return 98 - remainder
154
-
155
-where iban_checksum(str(<NON_TERMINAL>)) == int(<NON_TERMINAL>)
+ check_digits = 98 - remainder
+ return check_digits
+
156
+where int(iban_checksum(str(<NON_TERMINAL>))) == int(<NON_TERMINAL>)
157
"""
158
)
159
0 commit comments