2021.4 #19
@ -284,7 +284,7 @@ class Console:
|
|||||||
def spinner(cls, message: str, call: Callable, *args, text_foreground_color: Union[str, ForegroundColorEnum] = None,
|
def spinner(cls, message: str, call: Callable, *args, text_foreground_color: Union[str, ForegroundColorEnum] = None,
|
||||||
spinner_foreground_color: Union[str, ForegroundColorEnum] = None,
|
spinner_foreground_color: Union[str, ForegroundColorEnum] = None,
|
||||||
text_background_color: Union[str, BackgroundColorEnum] = None,
|
text_background_color: Union[str, BackgroundColorEnum] = None,
|
||||||
spinner_background_color: Union[str, BackgroundColorEnum] = None) -> any:
|
spinner_background_color: Union[str, BackgroundColorEnum] = None, **kwargs) -> any:
|
||||||
if cls._hold_back:
|
if cls._hold_back:
|
||||||
cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args))
|
cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args))
|
||||||
return
|
return
|
||||||
@ -305,7 +305,7 @@ class Console:
|
|||||||
cls.set_hold_back(True)
|
cls.set_hold_back(True)
|
||||||
spinner = SpinnerThread(len(message), spinner_foreground_color, spinner_background_color)
|
spinner = SpinnerThread(len(message), spinner_foreground_color, spinner_background_color)
|
||||||
spinner.start()
|
spinner.start()
|
||||||
return_value = call(*args)
|
return_value = call(*args, **kwargs)
|
||||||
spinner.stop_spinning()
|
spinner.stop_spinning()
|
||||||
cls.set_hold_back(False)
|
cls.set_hold_back(False)
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class NewService(CommandABC):
|
|||||||
os.makedirs(project_path)
|
os.makedirs(project_path)
|
||||||
|
|
||||||
with open(os.path.join(project_path, 'cpl.json'), 'w') as project_json:
|
with open(os.path.join(project_path, 'cpl.json'), 'w') as project_json:
|
||||||
project_json.write(json.dumps(self._project_json, indent=4))
|
project_json.write(json.dumps(self._project_json, indent=2))
|
||||||
project_json.close()
|
project_json.close()
|
||||||
|
|
||||||
templates: list[TemplateFileABC] = [
|
templates: list[TemplateFileABC] = [
|
||||||
|
Loading…
Reference in New Issue
Block a user