8000 Check deferred nodes after all first passes in an import cycle by gvanrossum · Pull Request #2264 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Check deferred nodes after all first passes in an import cycle #2264

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 21 commits into from
Oct 24, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suppress reveal_type() output when current node is being deferred
  • Loading branch information
Guido van Rossum committed Oct 24, 2016
commit 30c84fa7e63ebf527f2228af615d9491397a6a8c
3 changes: 2 additions & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,8 @@ def is_valid_cast(self, source_type: Type, target_type: Type) -> bool:
def visit_reveal_type_expr(self, expr: RevealTypeExpr) -> Type:
"""Type check a reveal_type expression."""
revealed_type = self.accept(expr.expr)
self.msg.reveal_type(revealed_type, expr)
if not self.chk.current_node_deferred:
self.msg.reveal_type(revealed_type, expr)
return revealed_type

def visit_type_application(self, tapp: TypeApplication) -> Type:
Expand Down
0