Skip to content

Commit 5600eea

Browse files
committed
Fix Typing on older Pythons
1 parent 63bd865 commit 5600eea

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/pip/_internal/models/link.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
import posixpath
55
import re
66
import urllib.parse
7-
from typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Tuple, Union
7+
from typing import (
8+
TYPE_CHECKING,
9+
Dict,
10+
List,
11+
NamedTuple,
12+
Optional,
13+
Tuple,
14+
Union,
15+
Mapping,
16+
)
817

918
from pip._internal.utils.filetypes import WHEEL_EXTENSION
1019
from pip._internal.utils.hashes import Hashes
@@ -47,7 +56,7 @@ def __init__(
4756
requires_python: Optional[str] = None,
4857
yanked_reason: Optional[str] = None,
4958
cache_link_parsing: bool = True,
50-
hashes: Optional[dict[str, str]] = None,
59+
hashes: Optional[Mapping[str, str]] = None,
5160
) -> None:
5261
"""
5362
:param url: url of the resource pointed to (href of the link)

0 commit comments

Comments
 (0)