1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-22 20:00:29 +03:00

update.py: Finaly mypy pass

* It's possible the `xml` code could be changed to make types work.  But
  the code works, ignore types on those calls.
This commit is contained in:
Athanasius 2022-12-04 15:12:46 +00:00
parent 74ebba20b4
commit 04145146d7
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -185,8 +185,11 @@ class Updater(object):
sparkle_platform = 'windows'
for item in feed.findall('channel/item'):
ver = item.find('enclosure').attrib.get('{http://www.andymatuschak.org/xml-namespaces/sparkle}version')
ver_platform = item.find('enclosure').attrib.get(
# xml is a pain with types, hence these ignores
ver = item.find('enclosure').attrib.get( # type: ignore
'{http://www.andymatuschak.org/xml-namespaces/sparkle}version'
)
ver_platform = item.find('enclosure').attrib.get( # type: ignore
'{http://www.andymatuschak.org/xml-namespaces/sparkle}os'
)
if ver_platform != sparkle_platform:
@ -196,8 +199,8 @@ class Updater(object):
sv = semantic_version.Version.coerce(ver)
items[sv] = EDMCVersion(
version=ver, # sv might have mangled version
title=item.find('title').text,
version=str(ver), # sv might have mangled version
title=item.find('title').text, # type: ignore
sv=sv
)