Skip to content

Commit

Permalink
Remove Channels.abspath that is unused (#3652)
Browse files Browse the repository at this point in the history
  • Loading branch information
benclifford authored Oct 23, 2024
1 parent bcea1fa commit 5f5aa46
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
11 changes: 0 additions & 11 deletions parsl/channels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,3 @@ def isdir(self, path: str) -> bool:
Path of directory to check.
"""
pass

@abstractmethod
def abspath(self, path: str) -> str:
"""Return the absolute path.
Parameters
----------
path : str
Path for which the absolute path will be returned.
"""
pass
12 changes: 1 addition & 11 deletions parsl/channels/local/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,12 @@ def makedirs(self, path, mode=0o700, exist_ok=False):

return os.makedirs(path, mode, exist_ok)

def abspath(self, path):
"""Return the absolute path.
Parameters
----------
path : str
Path for which the absolute path will be returned.
"""
return os.path.abspath(path)

@property
def script_dir(self):
return self._script_dir

@script_dir.setter
def script_dir(self, value):
if value is not None:
value = self.abspath(value)
value = os.path.abspath(value)
self._script_dir = value
10 changes: 0 additions & 10 deletions parsl/channels/ssh/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,6 @@ def makedirs(self, path, mode=0o700, exist_ok=False):
self.execute_wait('mkdir -p {}'.format(path))
self._valid_sftp_client().chmod(path, mode)

def abspath(self, path):
"""Return the absolute path on the remote side.
Parameters
----------
path : str
Path for which the absolute path will be returned.
"""
return self._valid_sftp_client().normalize(path)

@property
def script_dir(self):
return self._script_dir
Expand Down

0 comments on commit 5f5aa46

Please sign in to comment.