Skip to content

Commit 8b78f78

Browse files
lucasicrarthurdejong
authored andcommitted
Remove superfluous modulus operation
Closes #470
1 parent ad4af91 commit 8b78f78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdnum/jp/in_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def calc_check_digit(number: str) -> str:
6161
"""Calculate the check digit. The number passed should not have
6262
the check digit included."""
6363
weights = (6, 5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
64-
s = sum(w * int(n) for w, n in zip(weights, number)) % 11
64+
s = sum(w * int(n) for w, n in zip(weights, number))
6565
return str(-s % 11 % 10)
6666

6767

0 commit comments

Comments
 (0)