aboutcode-org/license-expression

`AND` statements not flattened in dedup()

Opened this issue · 0 comments

For example licensing.dedup() should have simplified the following expression:

(gpl AND mit) AND mit AND (gpl OR mit) -> gpl AND mit AND (gpl OR mit)

But currently it does not flatten AND statements in parenthesis, but it should.

This can be done either by:

  1. licensing.dedup(str(expression.flatten())) (?)
  2. By replacing OR statements by one symbol, simplifying and then getting the OR statements back by using substitution tables.