8000 bpo-45853: Fix misspelling and unused import in pathlib (GH-30292) · python/cpython@8d7644f · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d7644f

Browse files
authored
bpo-45853: Fix misspelling and unused import in pathlib (GH-30292)
1 parent fb44d05 commit 8d7644f

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
@@ -8,7 +8,7 @@
88
import sys
99
import warnings
1010
from _collections_abc import Sequence
11-
from errno import EINVAL, ENOENT, ENOTDIR, EBADF, ELOOP
11+
from errno import ENOENT, ENOTDIR, EBADF, ELOOP
1212
from operator import attrgetter
1313
from stat import S_ISDIR, S_ISLNK, S_ISREG, S_ISSOCK, S_ISBLK, S_ISCHR, S_ISFIFO
1414
from urllib.parse import quote_from_bytes as urlquote_from_bytes
@@ -28,15 +28,15 @@
2828
_WINERROR_CANT_RESOLVE_FILENAME = 1921 # broken symlink pointing to itself
2929

3030
# EBADF - guard against macOS `stat` throwing EBADF
31-
_IGNORED_ERROS = (ENOENT, ENOTDIR, EBADF, ELOOP)
31+
_IGNORED_ERRNOS = (ENOENT, ENOTDIR, EBADF, ELOOP)
3232

3333
_IGNORED_WINERRORS = (
3434
_WINERROR_NOT_READY,
3535
_WINERROR_INVALID_NAME,
3636
_WINERROR_CANT_RESOLVE_FILENAME)
3737

3838
def _ignore_error(exception):
39-
return (getattr(exception, 'errno', None) in _IGNORED_ERROS or
39+
return (getattr(exception, 'errno', None) in _IGNORED_ERRNOS or
4040
getattr(exception, 'winerror', None) in _IGNORED_WINERRORS)
4141

4242

0 commit comments

Comments
 (0)
0