5
5
from os import fspath
6
6
from os .path import samestat
7
7
from pathlib import Path , PurePosixPath , PureWindowsPath # type: ignore
8
- from typing import TYPE_CHECKING , Any , Callable , Optional
9
8
from sys import version_info as python_version
9
+ from typing import TYPE_CHECKING , Any , Callable , Optional
10
10
11
11
from ..utils import for_all_methods
12
12
@@ -118,6 +118,7 @@ def rename(self, *args, **kwargs):
118
118
def replace (self , * args , ** kwargs ):
119
119
return self .c .os .replace (* args , ** kwargs )
120
120
121
+
121
122
class _Template :
122
123
123
124
def __init__ (self , accessor : _SSHAccessor ) -> None :
@@ -126,10 +127,10 @@ def __init__(self, accessor: _SSHAccessor) -> None:
126
127
127
128
@for_all_methods (_to_ssh_path , subclasses = True , exclude = DEC_EXCLUDE )
128
129
class SSHPath (Path ):
129
- """Object porviding similar API to Pathlib.Path but for remote server.
130
+ """Object providing similar API to Pathlib.Path but for remote server.
130
131
131
132
The for all methods wrapper will wrap whole pathlib library and thus will
132
- always try to cas every path to SSHPath, so logic must be emplyed in
133
+ always try to cast every path to SSHPath, so logic must be emplyed in
133
134
wrapper to prevent this.
134
135
135
136
Parameters
@@ -141,16 +142,9 @@ class SSHPath(Path):
141
142
142
143
Warnings
143
144
--------
144
- Not all methods are implemented! Some rather obscure had to be left out
145
- due to the nature of ssh and laif python_version >= (3, 10):zyness of the author
146
-
147
145
Some methods have changed signature from classmethod -> instancemethod
148
- since old approach was not vaiable in this application. Most notably :
146
+ since old approach was not vaiable in this application. These are :
149
147
home() and cwd().
150
-
151
- Raises
152
- ------
153
- NotImplementedError when on some methods that have not been implemented.
154
148
"""
155
149
156
150
_flavour = Any
0 commit comments