Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/ec
Commit message (Collapse)AuthorAgeFilesLines
* Fix detection of natural RUC valuesArthur de Jong2021-09-191-13/+34
| | | | | | | A natural RUC is the CI plus an establishment number. Both the natural RUC and the public RUC can have a third digit with the value 6. Closes https://github.com/arthurdejong/python-stdnum/issues/267
* Support 6 as third digit for foreign people in EcuadorChristopher Ormaza2020-06-281-1/+1
| | | | Closes https://github.com/arthurdejong/python-stdnum/pull/228
* Use an internal isdigits() function instead of str.isdigit()Arthur de Jong2019-04-292-3/+4
| | | | | | | | | | | The problem with the latter is that it will also accept all kinds of unicode digits that are not the ASCII 0-9 digits causing all kinds of problems in check digit calculations. Some of these unicode characters are also considered digits by int() but some are not (such as the SUPERSCRIPT TWO unicode character). Closes https://github.com/arthurdejong/python-stdnum/issues/96
* Support Cedula and RUC of foreignersChristopher Ormaza2018-12-072-2/+2
| | | | | | | Add the case of Cedulas and RUCs of foreigners in Ecuador, as Venezuelans and Colombians Closes https://github.com/arthurdejong/python-stdnum/pull/87
* Update the flake8 ignore listArthur de Jong2018-02-141-1/+1
| | | | | | | | | | | | Re-enable the flake8 test for unused imports by explicitly marking imports for namespace purposes. This allows us to remove a few unused imports. A few more cleanups that allow us to reduce the number of ignored flake8 ignored tests. The remaining ignored tests are now documented. Ignore a flake8 warning about print statements because we use print in the update scripts.
* Docstring improvementsArthur de Jong2017-09-112-8/+8
|
* Use a slightly more readable weight alternationArthur de Jong2017-04-071-2/+2
| | | | | Switch to a slightly more readable syntax for alternating between two weights in checksums calculations.
* Use zip() instead of enumerate()Arthur de Jong2015-10-051-2/+2
| | | | Makes the code slightly simpler and more compact.
* Validate parts of numbersArthur de Jong2014-10-172-0/+12
| | | | | This raises exceptions when the provice or establishment number part of the number contains invalid values.
* Refactor checksum functionsArthur de Jong2014-10-172-47/+23
| | | | | | Use the CI checks from within the RUC module for natural RUC numbers (thereby eliminating a bug in the RUC checksum calculation) and simplify the checksum functions.
* Use dedicated doctestsArthur de Jong2014-10-172-15/+7
| | | | | | | This moves a number of the existing test cases to dedicated doctest files and extend the tests with more numbers and corner cases. This also fixes a few docstrings.
* Add Ecuadorian CI and RUC numbersJonathan Finlay2014-10-143-0/+215
Add modules for Ecuadorian Identification Card (CI - Cédula de identidad) and Fiscal Numbers (RUC - Registro Único de Contribuyentes)