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 48bc430 commit ff26ebfCopy full SHA for ff26ebf
mypy/constraints.py
@@ -272,7 +272,7 @@ def infer_constraints_for_callable(
272
)
273
274
275
- constraints = [c for i, c in enumerate(constraints) if c not in constraints[:i]]
+ constraints = list(dict.fromkeys(constraints))
276
if any(isinstance(v, ParamSpecType) for v in callee.variables):
277
# As a perf optimization filter imprecise constraints only when we can have them.
278
constraints = filter_imprecise_kinds(constraints)
0 commit comments