Skip to content

Fix and optimise overload compatibility checking - #14018

Merged
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:overload-compat
Nov 6, 2022
Merged

Fix and optimise overload compatibility checking#14018
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:overload-compat

Conversation

@hauntsaninja

@hauntsaninjahauntsaninja commented Nov 5, 2022

Copy link
Copy Markdown
Collaborator

Discovered as part of #14017

@hauntsaninja
hauntsaninja marked this pull request as draft November 5, 2022 23:44
@github-actions

This comment has been minimized.

@hauntsaninja
hauntsaninja marked this pull request as ready for review November 6, 2022 00:24
Comment threadmypy/subtypes.py
previous_match_left_index = left_index
found_match = True
matched_overloads.add(left_index)
break

@hauntsaninjahauntsaninjaNov 6, 2022

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the break here is the main functional change, everything in the second commit preserves behaviour

@hauntsaninjahauntsaninja changed the title Fix bug in overload compatibility checkingFix bug and optimise overload compatibility checkingNov 6, 2022
@hauntsaninjahauntsaninja changed the title Fix bug and optimise overload compatibility checkingFix and optimise overload compatibility checkingNov 6, 2022
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@hauntsaninja
hauntsaninja merged commit 807da26 into python:masterNov 6, 2022
@hauntsaninja
hauntsaninja deleted the overload-compat branch November 6, 2022 01:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hauntsaninja@JelleZijlstra