pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python-validators/validators/commit/f7742c55b680036116a7f61e140476ffd4774ccb

link crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0bd78641c0a1f3e0.css" /> Refactor API: remove print from ru_inn, update description, and expos… · python-validators/validators@f7742c5 · GitHub
Skip to content

Commit f7742c5

Browse files
Refactor API: remove print from ru_inn, update description, and expose via __init__ (#419)
* fix(api): remove print function from ru_inn method * feat: add ru_inn method to __init__ * docs(ru_inn): update description from "Russia INN." to "Russia."
1 parent d6241fc commit f7742c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/validators/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
fr_ssn,
2424
ind_aadhar,
2525
ind_pan,
26+
ru_inn
2627
)
2728
from .iban import iban
2829
from .ip_address import ipv4, ipv6
@@ -89,6 +90,7 @@
8990
"fr_ssn",
9091
"ind_aadhar",
9192
"ind_pan",
93+
"ru_inn",
9294
# ...
9395
"iban",
9496
# ip_addresses

src/validators/i18n/ru.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Russia INN."""
1+
"""Russia."""
22

33
from validators.utils import validator
44

@@ -50,7 +50,6 @@ def ru_inn(value: str):
5050
control_number1 = sum([d * w for d, w in zip(digits, weight_coefs1)]) % 11
5151
weight_coefs2 = [3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8, 0]
5252
control_number2 = sum([d * w for d, w in zip(digits, weight_coefs2)]) % 11
53-
print(control_number1, control_number2, value)
5453
return (
5554
(control_number1 % 10) == digits[-2]
5655
if control_number1 > 9

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy