Also check the upgrade plugins.

This commit is contained in:
Simon Edwards 2017-01-17 20:56:28 +01:00
parent 1b43e4981e
commit cf85831d87
2 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@ class Profile:
#
# \param serialised A string with the contents of a profile.
# \param filename The supposed filename of the profile, without extension.
def __init__(self, serialised: str, filename: str):
def __init__(self, serialised: str, filename: str) -> None:
self._filename = filename
parser = configparser.ConfigParser(interpolation = None)
@ -58,17 +58,17 @@ class Profile:
self._material_name = None
# Parse the settings.
self._settings = {}
self._settings = {} # type: Dict[str,str]
if parser.has_section("settings"):
for key, value in parser["settings"].items():
self._settings[key] = value
# Parse the defaults and the disabled defaults.
self._changed_settings_defaults = {}
self._changed_settings_defaults = {} # type: Dict[str,str]
if parser.has_section("defaults"):
for key, value in parser["defaults"].items():
self._changed_settings_defaults[key] = value
self._disabled_settings_defaults = []
self._disabled_settings_defaults = [] # type: List[str]
if parser.has_section("disabled_defaults"):
disabled_defaults_string = parser.get("disabled_defaults", "values")
self._disabled_settings_defaults = [item for item in disabled_defaults_string.split(",") if item != ""] # Split by comma.

View file

@ -2,7 +2,7 @@
import os
import subprocess
os.putenv("MYPYPATH", r".;.\plugins;..\Uranium_hint\;..\Uranium_hint\stubs\\" )
os.putenv("MYPYPATH", r".;.\plugins;.\plugins\VersionUpgrade;..\Uranium_hint\;..\Uranium_hint\stubs\\" )
def findModules(path):
result = []
@ -14,7 +14,7 @@ def findModules(path):
plugins = findModules("plugins")
plugins.sort()
mods = ["cura"] + plugins
mods = ["cura"] + plugins + findModules("plugins/VersionUpgrade")
for mod in mods:
print("------------- Checking module {mod}".format(**locals()))