Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/co
Commit message (Collapse)AuthorAgeFilesLines
* Use an internal isdigits() function instead of str.isdigit()Arthur de Jong2019-04-291-2/+2
| | | | | | | | | | | 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
* Switch from import-order to isortArthur de Jong2019-03-031-2/+2
|
* Update the flake8 ignore listArthur de Jong2018-02-141-2/+2
| | | | | | | | | | | | 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-111-5/+4
|
* Code style improvementsArthur de Jong2015-10-111-3/+3
| | | | | | | Ensure that regular expressions are r'' strings, avoid too long lines and fix line wrapping. Also avoid catching toplevel Exception when possible and use binascii for hex to binary conversion which is available in both Python 2 and 3.
* Update Colombian NIT checksArthur de Jong2015-10-051-19/+10
| | | | | | | | | This adds a number of tests for numbers found online. The length check has also been revisited because both shorter numbers and longer number have been found. This also updates the format() function to handle arbitrary length numbers.
* Use zip() instead of enumerate()Arthur de Jong2015-10-051-2/+2
| | | | Makes the code slightly simpler and more compact.
* Add Colombian NIT/RUT (VAT) codeArthur de Jong2015-04-232-0/+117
Based on the implementation in the vatnumber module.