|
1 | 1 | import logging |
2 | 2 | import typing |
3 | 3 | from dataclasses import fields |
4 | | -from typing import Generic, Tuple, TypeVar, Union, get_args, get_origin |
| 4 | +from typing import Generic, TypeVar, Union, get_args, get_origin |
5 | 5 |
|
6 | 6 | log = logging.getLogger(__name__) |
7 | 7 |
|
@@ -67,7 +67,7 @@ def update(self, other): |
67 | 67 | def __hash__(cls): |
68 | 68 | pass |
69 | 69 |
|
70 | | - def _validate_entry(self, kv: Tuple): |
| 70 | + def _validate_entry(self, kv: tuple): |
71 | 71 | """Validate one `key`/`value` pair.""" |
72 | 72 | key, value = kv |
73 | 73 | try: |
@@ -147,7 +147,7 @@ def _get_field_types(self, obj): |
147 | 147 | self._field = next(filter(lambda f: f.name == self._name[1:], fields(obj))) |
148 | 148 | # The type is DictLike[KeyType, ValueType]; retrieve those arguments |
149 | 149 | kt, vt = get_args(self._field.type) |
150 | | - # Store. If ValueType is a generic, e.g. List[int], store only List. |
| 150 | + # Store. If ValueType is a generic, e.g. list[int], store only List. |
151 | 151 | self._types = (kt, get_origin(vt) or vt) |
152 | 152 |
|
153 | 153 | def __get__(self, obj, type) -> DictLike[KT, VT]: |
|
0 commit comments