Skip to content

Commit

Permalink
Merge pull request #6 from Deric-W/python3.12
Browse files Browse the repository at this point in the history
Python3.12
  • Loading branch information
Deric-W authored Oct 18, 2023
2 parents 9c2bf46 + 9dd176f commit 6de410e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
Test:
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand Down
4 changes: 1 addition & 3 deletions lambda_calculus/terms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def alpha_conversion(self, new: V) -> Abstraction[V]:
)
raise CollisionError("new variable would bind free variable in body", (new,))

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

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

0 comments on commit 6de410e

Please sign in to comment.