Skip to content

Commit

Permalink
Fix TODOs in binder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pkch committed Mar 28, 2017
1 parent 8e385f0 commit 0f06e06
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mypy/binder.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ def _get(self, key: Key, index: int=-1) -> Type:
return None

def put(self, expr: Expression, typ: Type) -> None:
# TODO: replace with isinstance(expr, BindableTypes)
if not isinstance(expr, (IndexExpr, MemberExpr, NameExpr)):
if not isinstance(expr, BindableTypes):
return
if not expr.literal:
return
Expand Down Expand Up @@ -203,8 +202,7 @@ def assign_type(self, expr: Expression,
type: Type,
declared_type: Type,
restrict_any: bool = False) -> None:
# TODO: replace with isinstance(expr, BindableTypes)
if not isinstance(expr, (IndexExpr, MemberExpr, NameExpr)):
if not isinstance(expr, BindableTypes):
return None
if not expr.literal:
return
Expand Down

0 comments on commit 0f06e06

Please sign in to comment.