Skip to content

Commit 0f06e06

Browse files
committed
Fix TODOs in binder.py
1 parent 8e385f0 commit 0f06e06

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mypy/binder.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ def _get(self, key: Key, index: int=-1) -> Type:
110110
return None
111111

112112
def put(self, expr: Expression, typ: Type) -> None:
113-
# TODO: replace with isinstance(expr, BindableTypes)
114-
if not isinstance(expr, (IndexExpr, MemberExpr, NameExpr)):
113+
if not isinstance(expr, BindableTypes):
115114
return
116115
if not expr.literal:
117116
return
@@ -203,8 +202,7 @@ def assign_type(self, expr: Expression,
203202
type: Type,
204203
declared_type: Type,
205204
restrict_any: bool = False) -> None:
206-
# TODO: replace with isinstance(expr, BindableTypes)
207-
if not isinstance(expr, (IndexExpr, MemberExpr, NameExpr)):
205+
if not isinstance(expr, BindableTypes):
208206
return None
209207
if not expr.literal:
210208
return

0 commit comments

Comments
 (0)