Skip to content

Commit 7328251

Browse files
Fix typos in docstrings for pathmap.py (#1985)
Signed-off-by: pranavkeerti66-hue <pranav.keerti66@gmail.com.>
1 parent 93294b9 commit 7328251

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

scanpipe/pipes/pathmap.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,12 @@ def get_reversed_path_segments(path):
164164
Return reversed segments list given a POSIX ``path`` string. We reverse
165165
based on path segments separated by a "/".
166166
167-
Note that the inputh ``path`` is assumed to be normalized, not relative and
167+
Note that the input ``path`` is assumed to be normalized, not relative and
168168
not containing double slash.
169169
170-
For example::
171-
>>> assert get_reversed_path_segments("a/b/c.js") == ["c.js", "b", "a"]
170+
For example:
171+
>>> get_reversed_path_segments("a/b/c.js")
172+
['c.js', 'b', 'a']
172173
"""
173174
# [::-1] does the list reversing
174175
reversed_segments = path.strip("/").split("/")[::-1]
@@ -177,13 +178,14 @@ def get_reversed_path_segments(path):
177178

178179
def convert_segments_to_path(segments):
179180
"""
180-
Return a path string is suitable for indexing or matching given a
181+
Return a path string suitable for indexing or matching given a
181182
``segments`` sequence of path segment strings.
182183
The resulting reversed path is prefixed and suffixed by a "/" irrespective
183184
of whether the original path is a file or directory and had such prefix or
184185
suffix.
185186
186-
For example::
187-
>>> assert convert_segments_to_path(["c.js", "b", "a"]) == "/c.js/b/a/"
187+
For example:
188+
>>> convert_segments_to_path(["c.js", "b", "a"])
189+
'/c.js/b/a/'
188190
"""
189191
return "/" + "/".join(segments) + "/"

0 commit comments

Comments
 (0)