Skip to content

Commit a42792d

Browse files
committed
Update UniversalPath to UPath in docs, codespell
1 parent ae11446 commit a42792d

File tree

7 files changed

+18
-19
lines changed

7 files changed

+18
-19
lines changed

notebooks/examples.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
{
6262
"cell_type": "markdown",
6363
"source": [
64-
"If you give it a scheme registered with fsspec, it will return a UniversalPath which uses fsspec FileSystem backend"
64+
"If you give it a scheme registered with fsspec, it will return a UPath which uses fsspec FileSystem backend"
6565
],
6666
"metadata": {
6767
"ein.tags": "worksheet-0",
@@ -91,9 +91,9 @@
9191
"source": [
9292
"# fsspec FileSystems\n",
9393
"\n",
94-
"with `UniversalPath` you can connect to any fsspec FileSystem and interact with it in with it as you would with your local filesystem using pathlib. Connection arguments can be given in a couple of ways:\n",
94+
"with `UPath` you can connect to any fsspec FileSystem and interact with it in with it as you would with your local filesystem using pathlib. Connection arguments can be given in a couple of ways:\n",
9595
"\n",
96-
"You can give them as keyword arguments as descibed for each filesystem in the fsspec docs:"
96+
"You can give them as keyword arguments as described for each filesystem in the fsspec docs:"
9797
],
9898
"metadata": {
9999
"ein.tags": "worksheet-0",
@@ -149,7 +149,7 @@
149149
{
150150
"cell_type": "markdown",
151151
"source": [
152-
"with a UPath object instanciated, you can now interact with the paths with the usual `pathlib.Path` API"
152+
"with a UPath object instantiated, you can now interact with the paths with the usual `pathlib.Path` API"
153153
],
154154
"metadata": {}
155155
},

upath/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def __init__(self, parsed_url, *args, **kwargs):
2626

2727
def transform_args_wrapper(self, func):
2828
"""Modifies the arguments that get passed to the filesystem so that
29-
the UniversalPath instance gets stripped as the first argument. If a
30-
path keyword argument is not given, then `UniversalPath.path` is
29+
the UPath instance gets stripped as the first argument. If a
30+
path keyword argument is not given, then `UPath.path` is
3131
formatted for the filesystem and inserted as the first argument.
3232
If it is, then the path keyword argument is formatted properly for
3333
the filesystem.
@@ -184,7 +184,7 @@ def __getattribute__(self, item):
184184
if item == "__class__":
185185
return super().__getattribute__("__class__")
186186
if item in getattr(self.__class__, "not_implemented"):
187-
raise NotImplementedError(f"UniversalPath has no attribute {item}")
187+
raise NotImplementedError(f"UPath has no attribute {item}")
188188
else:
189189
return super().__getattribute__(item)
190190

@@ -274,7 +274,7 @@ def is_file(self):
274274
return False
275275

276276
def rename(self, target):
277-
# can be implimented, but may be tricky
277+
# can be implemented, but may be tricky
278278
raise NotImplementedError
279279

280280
def touch(self, trunicate=True, **kwargs):

upath/implementations/hdfs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ def __init__(self, parsed_url, *args, **kwargs):
77
self._fs.root_marker = "/"
88

99
def transform_args_wrapper(self, func):
10-
"""if arguments are passed to the wrapped function, and if the first
11-
argument is a UniversalPath instance, that argument is replaced with
12-
the UniversalPath's path attribute
10+
"""If arguments are passed to the wrapped function, and if the first
11+
argument is a UPath instance, that argument is replaced with
12+
the UPath's path attribute
1313
"""
1414

1515
def wrapper(*args, **kwargs):

upath/implementations/http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def __init__(self, parsed_url, *args, **kwargs):
99

1010
def transform_args_wrapper(self, func):
1111
"""if arguments are passed to the wrapped function, and if the first
12-
argument is a UniversalPath instance, that argument is replaced with
13-
the UniversalPath's path attribute
12+
argument is a UPath instance, that argument is replaced with
13+
the UPath's path attribute
1414
"""
1515

1616
def wrapper(*args, **kwargs):

upath/registry.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ def __getitem__(self, item):
1515
implemented_path = getattr(self, item, None)
1616
if not implemented_path:
1717
warning_str = (
18-
f"{item} filesystem path not explicitely implimented. "
19-
"falling back to default implimentation UniversalPath. "
20-
"This filesystem may not be tested"
21-
)
18+
f"{item} filesystem path not explicitly implemented. "
19+
"falling back to default implementation. "
20+
"This filesystem may not be tested")
2221
warnings.warn(warning_str, UserWarning)
2322
return upath.UPath
2423
return implemented_path

upath/tests/cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def test_readlink(self):
137137

138138
@pytest.mark.xfail
139139
def test_rename(self):
140-
# need to impliment
140+
# need to implement
141141
raise False
142142

143143
def test_replace(self):

upath/tests/implementations/test_s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_chmod(self):
2727
def test_mkdir(self):
2828
new_dir = self.path.joinpath("new_dir")
2929
# new_dir.mkdir()
30-
# mkdir doesnt really do anything. A directory only exists in s3
30+
# mkdir doesn't really do anything. A directory only exists in s3
3131
# if some file or something is written to it
3232
new_dir.joinpath("test.txt").touch()
3333
assert new_dir.exists()

0 commit comments

Comments
 (0)