Skip to content

Commit

Permalink
Add missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
haiqi96 committed Jul 5, 2024
1 parent 3dc9579 commit 702c9c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions components/clp-package-utils/clp_package_utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ def is_path_already_mounted(
return host_path_relative_to_mounted_root == container_path_relative_to_mounted_root


def generate_container_config(clp_config: CLPConfig, clp_home: pathlib.Path):
def generate_container_config(
clp_config: CLPConfig, clp_home: pathlib.Path
) -> Tuple[CLPConfig, CLPDockerMounts]:
"""
Copies the given config and sets up mounts mapping the relevant host paths into the container
Expand Down Expand Up @@ -256,7 +258,7 @@ def generate_container_config(clp_config: CLPConfig, clp_home: pathlib.Path):


def dump_container_config(
clp_config: CLPConfig, container_clp_config, container_name: str
clp_config: CLPConfig, container_clp_config: CLPConfig, container_name: str
) -> Tuple[pathlib.Path, pathlib.Path]:
container_config_filename = f".{container_name}-config.yml"
config_file_path_on_host = clp_config.logs_directory / container_config_filename
Expand All @@ -268,8 +270,8 @@ def dump_container_config(


def generate_container_start_cmd(
container_name: str, container_mounts: List[DockerMount], execution_container: str
):
container_name: str, container_mounts: List[CLPDockerMounts], execution_container: str
) -> List[str]:
clp_site_packages_dir = CONTAINER_CLP_HOME / "lib" / "python3" / "site-packages"
# fmt: off
container_start_cmd = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,5 @@ def main(argv):
return handle_decompression(parsed_args, clp_home, clp_config)



if "__main__" == __name__:
sys.exit(main(sys.argv))

0 comments on commit 702c9c2

Please sign in to comment.