Skip to content

Add some workarounds to simplify bootstrap - #5614

Merged
ilevkivskyi merged 6 commits into
python:masterfrom
ilevkivskyi:no-intersection
Sep 13, 2018
Merged

ilevkivskyi merged 6 commits into
python:masterfrom
ilevkivskyi:no-intersection

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

No description provided.

@ilevkivskyi
ilevkivskyi requested a review from JukkaL September 13, 2018 12:53

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one suggested refactoring, otherwise looks good. Did you verify that this fixes mypyc compilation?

Comment thread mypy/checker.py Outdated
if (isinstance(base_attr_node, (Var, FuncBase, Decorator))
and base_attr_node.is_final):
if (isinstance(base_attr.node, (Var, FuncDef, OverloadedFuncDef, Decorator))
and base_attr.node.is_final):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like this exact check gets repeated four times. I think that it would be worth turning it into a utility function, such as is_final_node().

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it compiles well, and passes self-check. Also I did the refactoring.

@ilevkivskyi
ilevkivskyi merged commit 4a574c2 into python:master Sep 13, 2018
@ilevkivskyi
ilevkivskyi deleted the no-intersection branch September 13, 2018 15:16
ilevkivskyi added a commit that referenced this pull request Sep 13, 2018
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