File tree 1 file changed +6
-20
lines changed
1 file changed +6
-20
lines changed Original file line number Diff line number Diff line change 1
1
"""Pathlib implementation that uses our own glob."""
2
2
from __future__ import annotations
3
- import ntpath
4
- import posixpath
5
3
import pathlib
6
4
import os
7
5
from . import glob
@@ -227,28 +225,16 @@ def rglob( # type: ignore[override]
227
225
yield from self .glob (patterns , flags = flags | _EXTMATCHBASE , limit = limit , exclude = exclude )
228
226
229
227
230
- if util .PY313 :
231
- class PurePosixPath (pathlib .PurePosixPath , PurePath ):
232
- """Pure Posix path."""
228
+ class PurePosixPath (PurePath , pathlib .PurePosixPath ):
229
+ """Pure Posix path."""
233
230
234
- __slots__ = ()
235
-
236
- class PureWindowsPath (pathlib .PureWindowsPath , PurePath ):
237
- """Pure Windows path."""
238
-
239
- __slots__ = ()
240
- else :
241
- class PurePosixPath (PurePath ): # type: ignore[no-redef]
242
- """Pure Posix path."""
231
+ __slots__ = ()
243
232
244
- _flavour = pathlib ._posix_flavour if not util .PY312 else posixpath # type: ignore[attr-defined]
245
- __slots__ = ()
246
233
247
- class PureWindowsPath (PurePath ): # type: ignore[no-redef]
248
- """Pure Windows path."""
234
+ class PureWindowsPath (PurePath , pathlib . PureWindowsPath ):
235
+ """Pure Windows path."""
249
236
250
- _flavour = pathlib ._windows_flavour if not util .PY312 else ntpath # type: ignore[attr-defined]
251
- __slots__ = ()
237
+ __slots__ = ()
252
238
253
239
254
240
class PosixPath (Path , PurePosixPath ):
You can’t perform that action at this time.
0 commit comments