Skip to content

Commit 1ba2ad9

Browse files
committed
remove unused _free_variables from UnsafeSubstitution
1 parent b229eab commit 1ba2ad9

File tree

1 file changed

+3
-8
lines changed
  • lambda_calculus/visitors/substitution

1 file changed

+3
-8
lines changed

lambda_calculus/visitors/substitution/unsafe.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""Substitutions which dont check if the substitutions are valid"""
44

55
from __future__ import annotations
6-
from collections.abc import Set
76
from typing import TypeVar, final
87
from ... import terms
98
from . import DeferrableSubstitution
@@ -28,18 +27,14 @@ class UnsafeSubstitution(DeferrableSubstitution[V]):
2827

2928
value: terms.Term[V]
3029

31-
free_variables: Set[V]
32-
3330
__slots__ = (
3431
"variable",
35-
"value",
36-
"free_variables"
32+
"value"
3733
)
3834

39-
def __init__(self, variable: V, value: terms.Term[V], free_variables: Set[V]) -> None:
35+
def __init__(self, variable: V, value: terms.Term[V]) -> None:
4036
self.variable = variable
4137
self.value = value
42-
self.free_variables = free_variables
4338

4439
@classmethod
4540
def from_substitution(cls, variable: V, value: terms.Term[V]) -> UnsafeSubstitution[V]:
@@ -50,7 +45,7 @@ def from_substitution(cls, variable: V, value: terms.Term[V]) -> UnsafeSubstitut
5045
:param value: value which should be substituted
5146
:return: new instance
5247
"""
53-
return cls(variable, value, value.free_variables())
48+
return cls(variable, value)
5449

5550
def visit_variable(self, variable: terms.Variable[V]) -> terms.Term[V]:
5651
"""

0 commit comments

Comments
 (0)