File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 2727if TYPE_CHECKING :
2828 from hashlib import _Hash
2929
30- from pip ._vendor .requests .models import Request , Response
30+ from pip ._vendor .requests .models import PreparedRequest , Request , Response
3131
3232 from pip ._internal .metadata import BaseDistribution
3333 from pip ._internal .network .download import _FileDownload
@@ -314,7 +314,7 @@ def __init__(
314314 self ,
315315 error_msg : str ,
316316 response : Response | None = None ,
317- request : Request | None = None ,
317+ request : Request | PreparedRequest | None = None ,
318318 ) -> None :
319319 """
320320 Initialize NetworkConnectionError with `request` and `response`
Original file line number Diff line number Diff line change 66import pathlib
77import sys
88import sysconfig
9- from typing import Any
109
1110from pip ._internal .models .scheme import SCHEME_KEYS , Scheme
1211from pip ._internal .utils .compat import WINDOWS
@@ -134,7 +133,7 @@ def _looks_like_red_hat_scheme() -> bool:
134133 from distutils .command .install import install
135134 from distutils .dist import Distribution
136135
137- cmd : Any = install (Distribution ())
136+ cmd : install = install (Distribution ())
138137 cmd .finalize_options ()
139138 return (
140139 cmd .exec_prefix == f"{ os .path .normpath (sys .exec_prefix )} /local"
Original file line number Diff line number Diff line change 44import os
55import sys
66import sysconfig
7+ from typing import Callable
78
89from pip ._internal .exceptions import InvalidSchemeCombination , UserInstallationInvalid
910from pip ._internal .models .scheme import SCHEME_KEYS , Scheme
2425
2526_AVAILABLE_SCHEMES = set (sysconfig .get_scheme_names ())
2627
27- _PREFERRED_SCHEME_API = getattr (sysconfig , "get_preferred_scheme" , None )
28+ _PREFERRED_SCHEME_API : Callable [[str ], str ] | None = getattr (
29+ sysconfig , "get_preferred_scheme" , None
30+ )
2831
2932
3033def _should_use_osx_framework_prefix () -> bool :
Original file line number Diff line number Diff line change 99import os .path
1010import sys
1111from dataclasses import dataclass
12- from typing import Any , Callable
12+ from typing import Callable
1313
1414from pip ._vendor .packaging .version import Version
1515from pip ._vendor .packaging .version import parse as parse_version
@@ -61,7 +61,7 @@ def _convert_date(isodate: str) -> datetime.datetime:
6161
6262class SelfCheckState :
6363 def __init__ (self , cache_dir : str ) -> None :
64- self ._state : dict [str , Any ] = {}
64+ self ._state : dict [str , str ] = {}
6565 self ._statefile_path = None
6666
6767 # Try to load the existing state
You can’t perform that action at this time.
0 commit comments