Skip to content

Commit 0ac4544

Browse files
committed
fix
1 parent 6c48aff commit 0ac4544

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mypy/suggestions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def get_suggestion(self, mod: str, node: FuncDef) -> PyAnnotateSignature:
439439
else:
440440
ret_types = [NoneType()]
441441

442-
guesses = [refine_callable(best, best.copy_modified(ret_type=t)) for t in ret_types]
442+
guesses = [best.copy_modified(ret_type=refine_type(best.ret_type, t)) for t in ret_types]
443443
guesses = self.filter_options(guesses, is_method)
444444
best, errors = self.find_best(node, guesses)
445445

@@ -921,8 +921,6 @@ def refine_union(t: UnionType, s: ProperType) -> Type:
921921
if not refined:
922922
new_items.append(lhs)
923923

924-
print('done', new_items)
925-
926924
# We don't ever want to drop None while making these things and
927925
# make_simplified_union calls join which cases
928926
with strict_optional_set(True):

0 commit comments

Comments
 (0)