Skip to content

Commit 183f34b

Browse files
committed
remove useless type: ignore
The Mypy Issue has been fixed.
1 parent 9c2bf46 commit 183f34b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lambda_calculus/terms/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def alpha_conversion(self, new: V) -> Abstraction[V]:
280280
)
281281
raise CollisionError("new variable would bind free variable in body", (new,))
282282

283-
def eta_reduction(self) -> Term[V]: # type: ignore[return]
283+
def eta_reduction(self) -> Term[V]:
284284
"""
285285
Remove a useless abstraction.
286286
@@ -291,8 +291,6 @@ def eta_reduction(self) -> Term[V]: # type: ignore[return]
291291
case Application(f, Variable(x)) if x == self.bound and x not in f.free_variables():
292292
return f
293293
case _:
294-
# mypy detects missing returns
295-
# because of https://github.com/python/mypy/issues/12534
296294
raise ValueError("abstraction is not useless")
297295

298296
def accept(self, visitor: visitors.Visitor[T, V]) -> T:

0 commit comments

Comments
 (0)