lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 2.0-1-g8b78f78

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

python-stdnum branch master updated. 2.0-1-g8b78f78



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  8b78f783105849a38cb40a823ab4d61aebd5c0d1 (commit)
      from  ad4af911a5e90cbd6e969235d1fbe19c13f2c9eb (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=8b78f783105849a38cb40a823ab4d61aebd5c0d1

commit 8b78f783105849a38cb40a823ab4d61aebd5c0d1
Author: Luca <luca.sicu02@gmail.com>
Date:   Mon May 5 20:33:45 2025 +0200

    Remove superfluous modulus operation
    
    Closes https://github.com/arthurdejong/python-stdnum/pull/470

diff --git a/stdnum/jp/in_.py b/stdnum/jp/in_.py
index d21f58a..cdd45a1 100644
--- a/stdnum/jp/in_.py
+++ b/stdnum/jp/in_.py
@@ -61,7 +61,7 @@ def calc_check_digit(number: str) -> str:
     """Calculate the check digit. The number passed should not have
     the check digit included."""
     weights = (6, 5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
-    s = sum(w * int(n) for w, n in zip(weights, number)) % 11
+    s = sum(w * int(n) for w, n in zip(weights, number))
     return str(-s % 11 % 10)
 
 

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

Summary of changes:
 stdnum/jp/in_.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
python-stdnum