@@ -411,7 +411,7 @@ def _revise_anonymous_flow(flow_content: str, first_message: str) -> str:
411
411
# return re.sub(r"flow\s*$", f"flow anonymous_{uuid.uuid4().hex}", flow_content)
412
412
413
413
414
- def _get_flow_ids (content : str ) -> list :
414
+ def _get_flow_ids (content : str ) -> List :
415
415
"""Returns the flow ids in the content.
416
416
417
417
Args:
@@ -442,7 +442,7 @@ def _get_flow_ids(content: str) -> list:
442
442
return root_flow_pattern .findall (content )
443
443
444
444
445
- def _get_flow_ids_from_newlines (new_lines : list ) -> list :
445
+ def _get_flow_ids_from_newlines (new_lines : List ) -> List :
446
446
"""Returns the flow ids in the new lines.
447
447
Args:
448
448
new_lines (list): The new lines to search for flow ids.
@@ -457,13 +457,13 @@ def _get_flow_ids_from_newlines(new_lines: list) -> list:
457
457
return _get_flow_ids (content )
458
458
459
459
460
- def _add_imports (new_lines : list , libraries : list [str ]) -> list :
460
+ def _add_imports (new_lines : List , libraries : List [str ]) -> List :
461
461
for library in libraries :
462
462
new_lines .insert (0 , f"import { library } \n " )
463
463
return new_lines
464
464
465
465
466
- def _add_main_co_file (file_path : str , libraries : Optional [list [str ]] = None ) -> bool :
466
+ def _add_main_co_file (file_path : str , libraries : Optional [List [str ]] = None ) -> bool :
467
467
"""Add the main co file to the given file path.
468
468
Args:
469
469
file_path (str): The path to the file to add the main co file to.
@@ -485,7 +485,7 @@ def _add_main_co_file(file_path: str, libraries: Optional[list[str]] = None) ->
485
485
return _write_to_file (file_path , new_lines )
486
486
487
487
488
- def _generate_main_flow (new_lines : list ) -> list :
488
+ def _generate_main_flow (new_lines : List ) -> List :
489
489
"""Adds a 'main' flow to the new lines that activates all other flows.
490
490
491
491
The 'main' flow is added at the beginning of the new lines. It includes an 'activate' command for each flow id found in the new lines.
@@ -524,14 +524,14 @@ def _generate_main_flow(new_lines: list) -> list:
524
524
return new_lines
525
525
526
526
527
- def _add_active_decorator (new_lines : list ) -> list :
527
+ def _add_active_decorator (new_lines : List ) -> List :
528
528
"""Adds an '@active' decorator above each flow id in the new lines.
529
529
530
530
Args:
531
- new_lines (list ): The lines to add the decorators to.
531
+ new_lines (List ): The lines to add the decorators to.
532
532
533
533
Returns:
534
- list : The lines with the decorators added.
534
+ List : The lines with the decorators added.
535
535
"""
536
536
decorated_lines = []
537
537
@@ -922,7 +922,7 @@ def _create_main_co_if_not_exists(file_path):
922
922
return main_file_path
923
923
924
924
925
- def _remove_files_from_path (path , filenames : list [str ]):
925
+ def _remove_files_from_path (path , filenames : List [str ]):
926
926
"""Remove files from the path.
927
927
928
928
Args:
0 commit comments