We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4980ae5 commit de23d08Copy full SHA for de23d08
mypy/subtypes.py
@@ -155,15 +155,13 @@ def is_subtype(
155
options=options,
156
)
157
else:
158
- assert not any(
159
- {
160
- ignore_type_params,
161
- ignore_pos_arg_names,
162
- ignore_declared_variance,
163
- always_covariant,
164
- ignore_promotions,
165
- options,
166
- }
+ assert (
+ not ignore_type_params
+ and not ignore_pos_arg_names
+ and not ignore_declared_variance
+ and not always_covariant
+ and not ignore_promotions
+ and options is None
167
), "Don't pass both context and individual flags"
168
if type_state.is_assumed_subtype(left, right):
169
return True
0 commit comments