Skip to content

Commit

Permalink
Fix mypy path type
Browse files Browse the repository at this point in the history
  • Loading branch information
Dramelac committed May 15, 2024
1 parent d14d2f8 commit 8955471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exegol/model/ContainerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def addVolume(self,
if set_sticky_group is set (on a Linux host), the permission setgid will be added to every folder on the volume."""
# The creation of the directory is ignored when it is a path to the remote drive
if volume_type == 'bind' and not (type(host_path) is str and host_path.startswith("\\\\")):
path = Path(host_path).absolute() if type(host_path) is str else host_path.absolute()
path: Path = host_path.absolute() if type(host_path) is Path else Path(host_path).absolute()
host_path = path.as_posix()
# Docker Desktop for Windows based on WSL2 don't have filesystem limitation
if EnvInfo.isMacHost():
Expand Down Expand Up @@ -1236,7 +1236,7 @@ def addRawVolume(self, volume_string):
"""Add a volume to the container configuration from raw text input.
Expected format is one of:
/source/path:/target/mount:rw
C:\source\path:/target/mount:ro
C:\\source\\path:/target/mount:ro
./relative/path:target/mount"""
logger.debug(f"Parsing raw volume config: {volume_string}")
parsing = re.match(r'^((\w:|\.|~)?([\\/][\w .,:\-|()&;]*)+):(([\\/][\w .,\-|()&;]*)+)(:(ro|rw))?$', volume_string)
Expand Down

0 comments on commit 8955471

Please sign in to comment.