Add typing for all version upgrade plug-ins

Hopefully we'll take this typing along when we next copy-paste the stuffs.

Contributes to issue CURA-5936.
This commit is contained in:
Ghostkeeper 2018-11-14 13:41:23 +01:00
parent fe66d15b9e
commit ae2b312472
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
21 changed files with 200 additions and 150 deletions

View file

@ -1,11 +1,16 @@
# Copyright (c) 2017 Ultimaker B.V.
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, TYPE_CHECKING
from . import VersionUpgrade25to26
if TYPE_CHECKING:
from UM.Application import Application
upgrade = VersionUpgrade25to26.VersionUpgrade25to26()
def getMetaData():
def getMetaData() -> Dict[str, Any]:
return {
"version_upgrade": {
# From To Upgrade function
@ -41,5 +46,5 @@ def getMetaData():
}
}
def register(app):
def register(app: "Application") -> Dict[str, Any]:
return { "version_upgrade": upgrade }