Skip to content

Commit 9fb93c4

Browse files
committed
mypy fix.
1 parent ca08c16 commit 9fb93c4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pip/_internal/network/cache.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
import os
55
from contextlib import contextmanager
6-
from typing import BinaryIO, Generator, Optional
6+
from datetime import datetime
7+
from typing import BinaryIO, Generator, Optional, Union
78

89
from pip._vendor.cachecontrol.cache import SeparateBodyBaseCache
910
from pip._vendor.cachecontrol.caches import SeparateBodyFileCache
@@ -62,7 +63,9 @@ def _write(self, path: str, data: bytes) -> None:
6263

6364
replace(f.name, path)
6465

65-
def set(self, key: str, value: bytes, expires: Optional[int] = None) -> None:
66+
def set(
67+
self, key: str, value: bytes, expires: Union[int, datetime, None] = None
68+
) -> None:
6669
path = self._get_cache_path(key)
6770
self._write(path, value)
6871

0 commit comments

Comments
 (0)