@@ -6,8 +6,6 @@ import time
6
6
7
7
import boto .connection
8
8
from typing import (
9
- _KT ,
10
- _VT ,
11
9
Any ,
12
10
Callable ,
13
11
Dict ,
@@ -18,9 +16,13 @@ from typing import (
18
16
Sequence ,
19
17
Tuple ,
20
18
Type ,
19
+ TypeVar ,
21
20
Union ,
22
21
)
23
22
23
+ _KT = TypeVar ('_KT' )
24
+ _VT = TypeVar ('_VT' )
25
+
24
26
_Provider = Any # TODO replace this with boto.provider.Provider once stubs exist
25
27
_LockType = Any # TODO replace this with _thread.LockType once stubs exist
26
28
@@ -63,7 +65,7 @@ def get_instance_metadata(
63
65
url : str = ...,
64
66
data : str = ...,
65
67
timeout : Optional [int ] = ...,
66
- num_retries : int = ...
68
+ num_retries : int = ...,
67
69
) -> Optional [LazyLoadMetadata ]: ...
68
70
def get_instance_identity (
69
71
version : str = ...,
@@ -138,11 +140,13 @@ class AuthSMTPHandler(logging.handlers.SMTPHandler):
138
140
def emit (self , record : logging .LogRecord ) -> None : ...
139
141
140
142
class LRUCache (Dict [_KT , _VT ]):
143
+ __KT = _KT
144
+ __VT = _VT
141
145
class _Item :
142
146
previous = ... # type: Optional[LRUCache._Item]
143
- key = ... # type: _KT
144
- value = ... # type: _VT
145
- def __init__ (self , key : _KT , value : _VT ) -> None : ...
147
+ key = ... # type: LRUCache.__KT
148
+ value = ... # type: LRUCache.__VT
149
+ def __init__ (self , key : LRUCache . __KT , value : LRUCache . __VT ) -> None : ...
146
150
147
151
capacity = ... # type: int
148
152
head = ... # type: Optional[LRUCache._Item]
0 commit comments