We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d87f0b2 commit d8bf6e2Copy full SHA for d8bf6e2
mypy/solve.py
@@ -350,7 +350,7 @@ def test(x: U) -> U: ...
350
351
# For convenience with current type application machinery, we use a stable
352
# choice that prefers the original type variables (not polymorphic ones) in SCC.
353
- best = sorted(scc, key=lambda x: (x.id not in original_vars, x.id.raw_id))[0]
+ best = min(scc, key=lambda x: (x.id not in original_vars, x.id.raw_id))
354
if isinstance(best, TypeVarType):
355
return best.copy_modified(values=values, upper_bound=common_upper_bound)
356
if is_trivial_bound(common_upper_bound_p, allow_tuple=True):
0 commit comments