mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix typing in the FirmwareUpdateChecker plugin.
This commit is contained in:
parent
839016d2f3
commit
f2b50c748c
3 changed files with 28 additions and 21 deletions
|
@ -9,6 +9,7 @@ from UM.Version import Version
|
|||
|
||||
import urllib.request
|
||||
from urllib.error import URLError
|
||||
from typing import Dict
|
||||
import codecs
|
||||
|
||||
from .FirmwareUpdateCheckerLookup import FirmwareUpdateCheckerLookup, get_settings_key_for_machine
|
||||
|
@ -24,14 +25,14 @@ class FirmwareUpdateCheckerJob(Job):
|
|||
ZERO_VERSION = Version(STRING_ZERO_VERSION)
|
||||
EPSILON_VERSION = Version(STRING_EPSILON_VERSION)
|
||||
|
||||
def __init__(self, container=None, silent=False, lookups:FirmwareUpdateCheckerLookup=None, callback=None):
|
||||
def __init__(self, container, silent, lookups: FirmwareUpdateCheckerLookup, callback) -> None:
|
||||
super().__init__()
|
||||
self._container = container
|
||||
self.silent = silent
|
||||
self._callback = callback
|
||||
|
||||
self._lookups = lookups
|
||||
self._headers = {} # Don't set headers yet.
|
||||
self._headers = {} # type:Dict[str, str] # Don't set headers yet.
|
||||
|
||||
def getUrlResponse(self, url: str) -> str:
|
||||
result = self.STRING_ZERO_VERSION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue