Skip to content

Commit eadc853

Browse files
committed
Add write method in NamedTemporaryFileResult
1 parent feaa76a commit eadc853

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pip/_internal/utils/filesystem.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@
1717
from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast
1818

1919
if MYPY_CHECK_RUNNING:
20-
from typing import Any, BinaryIO, Iterator, List, Union
20+
import abc
21+
from typing import Any, BinaryIO, Iterator, List, Union, AnyStr
2122

2223
class NamedTemporaryFileResult(BinaryIO):
2324
@property
2425
def file(self):
2526
# type: () -> BinaryIO
2627
pass
2728

29+
@abc.abstractmethod
30+
def write(self, s):
31+
# type: (AnyStr) -> int
32+
pass
33+
2834

2935
def check_path_owner(path):
3036
# type: (str) -> bool

0 commit comments

Comments
 (0)