mirror of
https://github.com/scummvm/scummvm-icons.git
synced 2025-10-28 14:32:25 -05:00
ICONS: fixed pylint warnings
This commit is contained in:
parent
74f1fee2c6
commit
3ae0e7c619
1 changed files with 19 additions and 14 deletions
33
gen-set.py
33
gen-set.py
|
|
@ -38,13 +38,15 @@ from pathlib import Path
|
||||||
from typing import Tuple, final, Set, AnyStr, List
|
from typing import Tuple, final, Set, AnyStr, List
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
|
MIN_PYTHON: final = (3, 8)
|
||||||
|
|
||||||
URLHEAD: final = "https://docs.google.com/spreadsheets/d/e/2PACX-1vQamumX0p-DYQa5Umi3RxX-pHM6RZhAj1qvUP0jTmaqutN9FwzyriRSXlO9rq6kR60pGIuPvCDzZL3s/pub?output=tsv"
|
URLHEAD: final = "https://docs.google.com/spreadsheets/d/e/2PACX-1vQamumX0p-DYQa5Umi3RxX-pHM6RZhAj1qvUP0jTmaqutN9FwzyriRSXlO9rq6kR60pGIuPvCDzZL3s/pub?output=tsv"
|
||||||
|
|
||||||
# filename/root gid element name
|
# filename/root gid element name
|
||||||
GUIDS: final = {'games' : ('1946612063', 'game'),
|
GUIDS: final = {'games': ('1946612063', 'game'),
|
||||||
'engines' : ('0', 'engine'),
|
'engines': ('0', 'engine'),
|
||||||
'companies' : ('226191984', 'company'),
|
'companies': ('226191984', 'company'),
|
||||||
'series' : ('1095671818', 'serie')
|
'series': ('1095671818', 'serie')
|
||||||
}
|
}
|
||||||
|
|
||||||
URL_ICONS_LIST: final = 'https://downloads.scummvm.org/frs/icons/LIST'
|
URL_ICONS_LIST: final = 'https://downloads.scummvm.org/frs/icons/LIST'
|
||||||
|
|
@ -414,6 +416,8 @@ def run_git(*git_args) -> List[AnyStr]:
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
|
||||||
|
if sys.version_info < MIN_PYTHON:
|
||||||
|
sys.exit(f"Python {MIN_PYTHON[0]}.{MIN_PYTHON[1]} or later is required.\n")
|
||||||
|
|
||||||
# check args / get date
|
# check args / get date
|
||||||
argParser = argparse.ArgumentParser(usage='%(prog)s [lastUpdate]')
|
argParser = argparse.ArgumentParser(usage='%(prog)s [lastUpdate]')
|
||||||
|
|
@ -422,14 +426,15 @@ args = argParser.parse_args()
|
||||||
|
|
||||||
# optional param, if not present fetch last_update from the LIST file
|
# optional param, if not present fetch last_update from the LIST file
|
||||||
if 'lastUpdate' in args:
|
if 'lastUpdate' in args:
|
||||||
last_update = datetime.strptime(args.lastUpdate, '%Y%m%d')
|
arg_last_update = datetime.strptime(args.lastUpdate, '%Y%m%d')
|
||||||
listfile_entries = {}
|
print('using provided inputDate: ' + arg_last_update.strftime(DATE_FORMAT) + '\n')
|
||||||
last_hash = ""
|
|
||||||
print('using provided inputDate: ' + last_update.strftime(DATE_FORMAT) + '\n')
|
|
||||||
else:
|
|
||||||
last_hash, listfile_entries = get_listfile_lasthash()
|
|
||||||
last_update = None
|
|
||||||
print('using last hash from ' + LIST_NAME + ': ' + last_hash + '\n')
|
|
||||||
|
|
||||||
# listfile_entries as param, no need the read the LIST file twice
|
# we have to read the LIST later (if needed)
|
||||||
main(last_update, last_hash, listfile_entries)
|
main(arg_last_update, "", [])
|
||||||
|
|
||||||
|
else:
|
||||||
|
arg_last_hash, arg_listfile_entries = get_listfile_lasthash()
|
||||||
|
print('using last hash from ' + LIST_NAME + ': ' + arg_last_hash + '\n')
|
||||||
|
|
||||||
|
# listfile_entries as param, no need the read the LIST file twice
|
||||||
|
main(None, arg_last_hash, arg_listfile_entries)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue