Skip to content

Commit b01111e

Browse files
committed
Fix unused type ignores with new mypy
Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent c65f1cf commit b01111e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

variantlib/validators/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _validate_type(value: Any, expected_type: type) -> type | None:
100100
if incorrect_key_types or incorrect_value_types:
101101
key_ored = Union.__getitem__((key_type, *incorrect_key_types))
102102
value_ored = Union.__getitem__((value_type, *incorrect_value_types))
103-
return list_type[key_ored, value_ored] # type: ignore[no-any-return,index]
103+
return list_type[key_ored, value_ored]
104104

105105
else:
106106
(item_type,) = get_args(expected_type)
@@ -110,7 +110,7 @@ def _validate_type(value: Any, expected_type: type) -> type | None:
110110
incorrect_types.discard(None)
111111
if incorrect_types:
112112
ored = Union.__getitem__((item_type, *incorrect_types))
113-
return list_type[ored] # type: ignore[no-any-return,index]
113+
return list_type[ored]
114114

115115
# Protocols and Iterable must enable subclassing to pass
116116
elif issubclass(expected_type, (Protocol, Iterable)): # type: ignore[arg-type]

0 commit comments

Comments
 (0)