8000 Explicit types for bindables ("Tighten Types" continued) by elazarg · Pull Request #2238 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Explicit types for bindables ("Tighten Types" continued) #2238

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 19 commits into from
Mar 27, 2017
Merged
Show file tree
Hide file tree
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
fix Key type
  • Loading branch information
elazarg committed Oct 18, 2016
commit 0dab4661bfba33612e85c9993a226fb7365b7d06
2 changes: 1 addition & 1 deletion mypy/binder.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def put_if_bindable(self, expr: Expression, typ: Type) -> None:
def unreachable(self) -> None:
self.frames[-1].unreachable = True

def get(self, expr: Union[Expression, Var]) -> Type:
def get(self, expr: Expression) -> Type:
return self._get(expr.literal_hash)

def is_unreachable(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion mypy/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Statement(Node):
class Expression(Node):
"""An expression node."""
literal = LITERAL_NO
literal_hash = None # type: object
literal_hash = None # type: Key


# TODO:
Expand Down
0