Skip to content

Commit 23ab857

Browse files
committed
Fix open_text_resource typing.
1 parent 876afde commit 23ab857

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pip/_internal/utils/compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
import os
77
import sys
8-
from typing import TextIO
8+
from typing import IO
99

1010
__all__ = ["get_path_uid", "stdlib_pkgs", "WINDOWS"]
1111

@@ -61,7 +61,7 @@ def get_path_uid(path: str) -> int:
6161

6262
def open_text_resource(
6363
package: str, resource: str, encoding: str = "utf-8", errors: str = "strict"
64-
) -> TextIO:
64+
) -> IO[str]:
6565
return (importlib.resources.files(package) / resource).open(
6666
"r", encoding=encoding, errors=errors
6767
)

0 commit comments

Comments
 (0)