Remove Python 2 support in generate-isocodes.py

And re-run the script.
This commit is contained in:
Martin Liska 2023-01-11 10:44:01 +01:00
parent 6b88951106
commit a26b622bcf
2 changed files with 138 additions and 86 deletions

File diff suppressed because it is too large Load Diff

View File

@ -37,17 +37,10 @@ with urlopen(iso_639_2_url) as f:
if entry_code not in langs:
langs.add(entry_code)
# Note that we are not pprint()ing the set directly because with
# Python 3 it results in curly brace set initializers that are not
# compatible with Python 2.6, do it with set([...]) instead.
print('# flake8: noqa')
print(f'# Generated with {sys.argv[0]}')
print('')
print('LANGUAGES = set(')
pprint(sorted(langs))
print(')')
print('LANGUAGES = \\')
pprint(langs)
print('')
print('COUNTRIES = set(')
pprint(sorted(countries))
print(')')
print('COUNTRIES = \\')
pprint(countries)