Skip to content

Commit

Permalink
Also check the upgrade plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Jan 17, 2017
1 parent 1b43e49 commit cf85831
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -58,17 +58,17 @@ def __init__(self, serialised: str, filename: str):
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.
Expand Down
4 changes: 2 additions & 2 deletions run_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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()))
Expand Down

0 comments on commit cf85831

Please sign in to comment.