Skip to content

Commit 7dd2095

Browse files
committed
Fix docstrings that intend '\' literally
This intended '\' literally, but it was actually '' because the \' became just ' (backslash-apostrophe becomes just aspostrophe).
1 parent 198548f commit 7dd2095

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: git/objects/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def name(self) -> str:
212212

213213
@property
214214
def abspath(self) -> PathLike:
215-
"""
215+
R"""
216216
:return:
217217
Absolute path to this index object in the file system ( as opposed to the
218218
.path field which is a path relative to the git repository ).

Diff for: git/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def stream_copy(source: BinaryIO, destination: BinaryIO, chunk_size: int = 512 *
239239

240240

241241
def join_path(a: PathLike, *p: PathLike) -> PathLike:
242-
"""Join path tokens together similar to osp.join, but always use
242+
R"""Join path tokens together similar to osp.join, but always use
243243
'/' instead of possibly '\' on windows."""
244244
path = str(a)
245245
for b in p:
@@ -277,7 +277,7 @@ def to_native_path_linux(path: PathLike) -> str:
277277

278278

279279
def join_path_native(a: PathLike, *p: PathLike) -> PathLike:
280-
"""
280+
R"""
281281
As join path, but makes sure an OS native path is returned. This is only
282282
needed to play it safe on my dear windows and to assure nice paths that only
283283
use '\'"""

0 commit comments

Comments
 (0)