Updated docs

This commit is contained in:
2023-02-20 15:55:20 +01:00
parent 48d0daabf5
commit 9e28dce5ce
632 changed files with 10917 additions and 6775 deletions

View File

@@ -12,7 +12,6 @@ from cpl_core.console.foreground_color_enum import ForegroundColorEnum
class ProjectSettings(ConfigurationModelABC):
def __init__(self):
ConfigurationModelABC.__init__(self)
@@ -122,15 +121,18 @@ class ProjectSettings(ConfigurationModelABC):
self._python_version = settings[ProjectSettingsNameEnum.python_version.value]
self._python_path = settings[ProjectSettingsNameEnum.python_path.value]
if ProjectSettingsNameEnum.python_path.value in settings and sys.platform in settings[ProjectSettingsNameEnum.python_path.value]:
path = f'{settings[ProjectSettingsNameEnum.python_path.value][sys.platform]}'
if (
ProjectSettingsNameEnum.python_path.value in settings
and sys.platform in settings[ProjectSettingsNameEnum.python_path.value]
):
path = f"{settings[ProjectSettingsNameEnum.python_path.value][sys.platform]}"
if path == '' or path is None:
Error.warn(f'{ProjectSettingsNameEnum.python_path.value} not set')
if path == "" or path is None:
Error.warn(f"{ProjectSettingsNameEnum.python_path.value} not set")
path = sys.executable
else:
if not path.endswith('bin/python'):
path = os.path.join(path, 'bin/python')
if not path.endswith("bin/python"):
path = os.path.join(path, "bin/python")
else:
path = sys.executable
@@ -143,6 +145,6 @@ class ProjectSettings(ConfigurationModelABC):
except Exception as e:
Console.set_foreground_color(ForegroundColorEnum.red)
Console.write_line(f'[ ERROR ] [ {__name__} ]: Reading error in {ProjectSettings.__name__} settings')
Console.write_line(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}')
Console.write_line(f"[ ERROR ] [ {__name__} ]: Reading error in {ProjectSettings.__name__} settings")
Console.write_line(f"[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}")
Console.set_foreground_color(ForegroundColorEnum.default)