Skip to content

Commit 2e1de62

Browse files
committed
v2.0.2
-------- 2022-06-03: define __fspath__ only on python >= 3.10
1 parent 1d50c06 commit 2e1de62

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

pathlib3x/pathlib3x.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,10 @@ def __str__(self):
555555
return self._str
556556

557557
# bitranox - define __fspath__ only on python >= 3.10
558-
if sys.version_info >= (3, 10):
559-
560-
def __fspath__(self):
561-
return str(self)
558+
'''
559+
def __fspath__(self):
560+
return str(self)
561+
'''
562562

563563
def as_posix(self):
564564
"""Return the string representation of the path with forward (/)

pathlib3x/pathlib3x.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ class PurePath(PathLike[str]):
7676
def __hash__(self) -> int: ...
7777
def __eq__(self, other: object) -> bool: ...
7878
# bitranox - define __fspath__ only on python >= 3.10
79-
if sys.version_info >= (3, 10):
80-
def __fspath__(self) -> str: ...
79+
'''
80+
def __fspath__(self) -> str: ...
81+
'''
8182
def __lt__(self, other: PurePath) -> bool: ...
8283
def __le__(self, other: PurePath) -> bool: ...
8384
def __gt__(self, other: PurePath) -> bool: ...

0 commit comments

Comments
 (0)