From 35b0fb78396699affa91ca9ca8de069bc0c98f06 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 01:54:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiidalab_launch/__main__.py | 4 +++- aiidalab_launch/instance.py | 4 +++- aiidalab_launch/profile.py | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/aiidalab_launch/__main__.py b/aiidalab_launch/__main__.py index 916f725..633a704 100644 --- a/aiidalab_launch/__main__.py +++ b/aiidalab_launch/__main__.py @@ -473,7 +473,9 @@ async def _async_start( ) for extra_mount in profile.extra_mounts: - source, target, rw_mode, mount_type = profile.parse_extra_mount(extra_mount) + source, target, rw_mode, mount_type = profile.parse_extra_mount( + extra_mount + ) click.secho( MSG_EXTRA_MOUNT.format( source=source, diff --git a/aiidalab_launch/instance.py b/aiidalab_launch/instance.py index 247f905..78ac89e 100644 --- a/aiidalab_launch/instance.py +++ b/aiidalab_launch/instance.py @@ -115,7 +115,9 @@ def _home_mount(self) -> docker.types.Mount: ) def _extra_mount(self, extra_mount: str) -> docker.types.Mount: - source_path, target_path, mode, mount_type = self.profile.parse_extra_mount(extra_mount) + source_path, target_path, mode, mount_type = self.profile.parse_extra_mount( + extra_mount + ) return docker.types.Mount( target=str(target_path), source=str(source_path), diff --git a/aiidalab_launch/profile.py b/aiidalab_launch/profile.py index b3185ef..02a7e31 100644 --- a/aiidalab_launch/profile.py +++ b/aiidalab_launch/profile.py @@ -39,9 +39,7 @@ def _get_mount_type(source: str) -> str: # we assume volume mount, whose name is restricted by Docker. if Path(source).is_absolute(): return "bind" - if not re.fullmatch( - _REGEX_VALID_IMAGE_NAMES, source - ): + if not re.fullmatch(_REGEX_VALID_IMAGE_NAMES, source): raise ValueError( f"Invalid extra mount volume name '{source}'. Use absolute path for bind mounts." )