Skip to content

Commit c0e93c1

Browse files
committed
Linting
1 parent f9af7ef commit c0e93c1

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

src/pip/_internal/metadata/pkg_resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def installed_by_distutils(self) -> bool:
176176
# provider has a "path" attribute not present anywhere else. Not the
177177
# best introspection logic, but pip has been doing this for a long time.
178178
try:
179-
return bool(self._dist._provider.path) # type: ignore
179+
return bool(self._dist._provider.path) # type: ignore
180180
except AttributeError:
181181
return False
182182

tests/lib/wheel.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,14 @@
1515
from io import BytesIO, StringIO
1616
from pathlib import Path
1717
from typing import (
18-
TYPE_CHECKING,
1918
AnyStr,
2019
TypeVar,
2120
Union,
22-
cast,
2321
)
2422
from zipfile import ZipFile
2523

2624
from pip._internal.metadata import BaseDistribution, MemoryWheel, get_wheel_distribution
2725

28-
if TYPE_CHECKING:
29-
# Vendored libraries with type stubs
30-
from requests.structures import CaseInsensitiveDict
31-
else:
32-
from pip._vendor.requests.structures import CaseInsensitiveDict
33-
34-
3526
# As would be used in metadata
3627
HeaderValue = Union[str, list[str]]
3728

tests/unit/metadata/test_metadata_pkg_resources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
)
1919

2020
pkg_resources = pytest.importorskip("pip._vendor.pkg_resources")
21-
from pip._vendor.pkg_resources import WorkingSet
21+
from pip._vendor.pkg_resources import WorkingSet # noqa: E402
22+
2223

2324
def _dist_is_local(dist: mock.Mock) -> bool:
2425
return dist.kind != "global" and dist.kind != "user"

0 commit comments

Comments
 (0)