Added logic to migrate attributes from workspace and project settings
This commit is contained in:
parent
091c89df2c
commit
c12ff4f9e3
@ -76,7 +76,11 @@ class BuildSettings(ConfigurationModelABC):
|
|||||||
self._included = settings[BuildSettingsNameEnum.included.value]
|
self._included = settings[BuildSettingsNameEnum.included.value]
|
||||||
self._excluded = settings[BuildSettingsNameEnum.excluded.value]
|
self._excluded = settings[BuildSettingsNameEnum.excluded.value]
|
||||||
self._package_data = settings[BuildSettingsNameEnum.package_data.value]
|
self._package_data = settings[BuildSettingsNameEnum.package_data.value]
|
||||||
self._project_references = settings[BuildSettingsNameEnum.project_references.value]
|
|
||||||
|
if BuildSettingsNameEnum.project_references.value in settings:
|
||||||
|
self._project_references = settings[BuildSettingsNameEnum.project_references.value]
|
||||||
|
else:
|
||||||
|
self._project_references = []
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
self._source_path = str(self._source_path).replace('/', '\\')
|
self._source_path = str(self._source_path).replace('/', '\\')
|
||||||
|
@ -127,7 +127,11 @@ class ProjectSettings(ConfigurationModelABC):
|
|||||||
|
|
||||||
self._python_executable = path
|
self._python_executable = path
|
||||||
|
|
||||||
self._classifiers = settings[ProjectSettingsNameEnum.classifiers.value]
|
if ProjectSettingsNameEnum.classifiers.value:
|
||||||
|
self._classifiers = settings[ProjectSettingsNameEnum.classifiers.value]
|
||||||
|
else:
|
||||||
|
self._classifiers = []
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Console.set_foreground_color(ForegroundColorEnum.red)
|
Console.set_foreground_color(ForegroundColorEnum.red)
|
||||||
Console.write_line(
|
Console.write_line(
|
||||||
|
@ -31,7 +31,11 @@ class WorkspaceSettings(ConfigurationModelABC):
|
|||||||
try:
|
try:
|
||||||
self._default_project = settings[WorkspaceSettingsNameEnum.default_project.value]
|
self._default_project = settings[WorkspaceSettingsNameEnum.default_project.value]
|
||||||
self._projects = settings[WorkspaceSettingsNameEnum.projects.value]
|
self._projects = settings[WorkspaceSettingsNameEnum.projects.value]
|
||||||
self._scripts = settings[WorkspaceSettingsNameEnum.scripts.value]
|
|
||||||
|
if WorkspaceSettingsNameEnum.scripts.value in settings:
|
||||||
|
self._scripts = settings[WorkspaceSettingsNameEnum.scripts.value]
|
||||||
|
else:
|
||||||
|
self._scripts = {}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Console.error(f'[ ERROR ] [ {__name__} ]: Reading error in {self.__name__} settings')
|
Console.error(f'[ ERROR ] [ {__name__} ]: Reading error in {self.__name__} settings')
|
||||||
Console.error(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}')
|
Console.error(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}')
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"sh_cpl==2021.4.dev1"
|
"sh_cpl==2021.4.0.post2"
|
||||||
],
|
],
|
||||||
"PythonVersion": ">=3.8",
|
"PythonVersion": ">=3.8",
|
||||||
"PythonPath": {
|
"PythonPath": {
|
||||||
@ -40,6 +40,7 @@
|
|||||||
"*/logs",
|
"*/logs",
|
||||||
"*/tests"
|
"*/tests"
|
||||||
],
|
],
|
||||||
"PackageData": {}
|
"PackageData": {},
|
||||||
|
"ProjectReferences": []
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user