Skip to content

Commit e53695d

Browse files
committed
Fix LicenseWithExceptionSymbol missing Expression class variables
Signed-off-by: Aaron Bassett <[email protected]>
1 parent 62fa21a commit e53695d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/license_expression/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,19 @@ def __init__(self, symbols=tuple(), quiet=True):
257257

258258
# FIXME: this should be instead a super class of all symbols
259259
self.LicenseSymbol = self.Symbol
260+
# LicenseWithExceptionSymbol does not get its internal Expressions mapped durring BooleanAlgebra init
261+
# have to set it after the fact
262+
tf_nao = {
263+
"TRUE": self.TRUE,
264+
"FALSE": self.FALSE,
265+
"NOT": self.NOT,
266+
"AND": self.AND,
267+
"OR": self.OR,
268+
"Symbol": self.Symbol,
269+
}
270+
271+
for name, value in tf_nao.items():
272+
setattr(LicenseWithExceptionSymbol, name, value)
260273

261274
symbols = symbols or tuple()
262275

0 commit comments

Comments
 (0)