8000 Exclude EU country codes from documentation · AmarisAI/python-stdnum@c113613 · GitHub
[go: up one dir, main page]

Skip to content

Commit c113613

Browse files
lambyarthurdejong
authored andcommitted
Exclude EU country codes from documentation
Whilst working on the Reproducible Builds effort [0], we noticed that python-stdnum could not be built reproducibly as it relies on a stable set ordering when generating the documentation. This has been filed in Debian as #88652 [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/886522 Closes: arthurdejong#61 Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
1 parent 9841bae commit c113613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdnum/eu/vat.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
from stdnum.util import clean, get_cc_module, get_soap_client
4444

4545

46-
country_codes = set([
46+
_country_codes = set([
4747
'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gb',
4848
'gr', 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt',
4949
'ro', 'se', 'si', 'sk',
@@ -63,7 +63,7 @@ def _get_cc_module(cc):
6363
cc = cc.lower()
6464
if cc == 'el':
6565
cc = 'gr'
66-
if cc not in country_codes:
66+
if cc not in _country_codes:
6767
return
6868
if cc not in _country_modules:
6969
_country_modules[cc] = get_cc_module(cc, 'vat')
@@ -105,7 +105,7 @@ def guess_country(number):
105105
for which it is valid. This returns lower case codes and returns gr (not
106106
el) for Greece."""
107107
return [cc
108-
for cc in country_codes
108+
for cc in _country_codes
109109
if _get_cc_module(cc).is_valid(number)]
110110

111111

0 commit comments

Comments
 (0)
0