Fix type hints and remove obsolete argument

This commit is contained in:
Glutanimate 2020-01-04 04:31:33 +01:00
parent 54253e2108
commit d9e56e22f9

View file

@ -345,7 +345,7 @@ and have been disabled: %(found)s"
###################################################################### ######################################################################
def _installationErrorReport( def _installationErrorReport(
self, result: AddonInstallationResult, base: str, mode="download" self, result: AddonInstallationResult, base: str, mode: str = "download"
) -> List[str]: ) -> List[str]:
messages = { messages = {
@ -370,7 +370,7 @@ and have been disabled: %(found)s"
return [template % dict(base=name, id=name, error=msg)] return [template % dict(base=name, id=name, error=msg)]
def _installationSuccessReport( def _installationSuccessReport(
self, result: AddonInstallationResult, base: str, mode="download" self, result: AddonInstallationResult, base: str, mode: str = "download"
) -> List[str]: ) -> List[str]:
if mode == "download": # preserve old format strings for i18n if mode == "download": # preserve old format strings for i18n
@ -666,7 +666,7 @@ class AddonsDialog(QDialog):
def onGetAddons(self): def onGetAddons(self):
GetAddons(self) GetAddons(self)
def onInstallFiles(self, paths: Optional[List[str]] = None, external: bool = False): def onInstallFiles(self, paths: Optional[List[str]] = None):
if not paths: if not paths:
key = _("Packaged Anki Add-on") + " (*{})".format(self.mgr.ext) key = _("Packaged Anki Add-on") + " (*{})".format(self.mgr.ext)
paths = getFile( paths = getFile(