Skip to content

Commit c9a07b4

Browse files
authored
Merge pull request #10345 from jdufresne/anystr
Replace AnyStr with str in src/pip/_internal/utils/misc.py
2 parents 2d7e190 + 973ac6a commit c9a07b4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

news/2faebe78-9ec6-4884-86cc-a082819c2648.trivial.rst

Whitespace-only changes.

src/pip/_internal/utils/misc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from types import TracebackType
1919
from typing import (
2020
Any,
21-
AnyStr,
2221
BinaryIO,
2322
Callable,
2423
Container,
@@ -104,7 +103,7 @@ def normalize_version_info(py_version_info):
104103

105104

106105
def ensure_dir(path):
107-
# type: (AnyStr) -> None
106+
# type: (str) -> None
108107
"""os.path.makedirs without EEXIST."""
109108
try:
110109
os.makedirs(path)
@@ -131,7 +130,7 @@ def get_prog():
131130
# Tenacity raises RetryError by default, explicitly raise the original exception
132131
@retry(reraise=True, stop=stop_after_delay(3), wait=wait_fixed(0.5))
133132
def rmtree(dir, ignore_errors=False):
134-
# type: (AnyStr, bool) -> None
133+
# type: (str, bool) -> None
135134
shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
136135

137136

0 commit comments

Comments
 (0)