Skip to content

Commit 613a171

Browse files
committed
Rename Path.scandir() to Path._scandir()
1 parent 3dfefdf commit 613a171

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/pathlib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def __init__(self, pat, child_parts, flavour):
349349

350350
def _select_from(self, parent_path, is_dir, exists):
351351
try:
352-
with parent_path.scandir() as scandir_it:
352+
with parent_path._scandir() as scandir_it:
353353
entries = list(scandir_it)
354354
for entry in entries:
355355
if self.dironly:
@@ -380,7 +380,7 @@ def __init__(self, pat, child_parts, flavour):
380380
def _iterate_directories(self, parent_path, is_dir):
381381
yield parent_path
382382
try:
383-
with parent_path.scandir() as scandir_it:
383+
with parent_path._scandir() as scandir_it:
384384
entries = list(scandir_it)
385385
for entry in entries:
386386
entry_is_dir = False
@@ -929,7 +929,7 @@ def iterdir(self):
929929
continue
930930
yield self._make_child_relpath(name)
931931

932-
def scandir(self):
932+
def _scandir(self):
933933
return os.scandir(self)
934934

935935
def glob(self, pattern):

0 commit comments

Comments
 (0)