Skip to content

Refactor: move MRO calculation to a new module #6133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2019
Merged

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 3, 2019

No description provided.

@JukkaL JukkaL requested a review from ilevkivskyi January 3, 2019 12:58
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Another great idea! Again, I have just one suggestion.

@@ -93,7 +93,7 @@
infer_reachability_of_if_statement, infer_condition_value, ALWAYS_FALSE, ALWAYS_TRUE,
MYPY_TRUE, MYPY_FALSE
)
from mypy.typestate import TypeState
from mypy.mro import calculate_mro, MroError
Copy link
Member

Choose a reason for hiding this comment

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

Currently, third pass does self.sem.calculate_class_mro(tdef), maybe we can also import calculate_mro there to reduce coupling between second and third passes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a good idea. I'll do this in a separate PR since this requires moving some code around.

@JukkaL JukkaL merged commit 25b83ea into master Jan 4, 2019
@ilevkivskyi ilevkivskyi deleted the refactor-semanal branch January 4, 2019 16:31
Sign up for free to 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