>>> from license_expression import Licensing
>>> lic_exp = "(apache-2.0 OR mit) AND (mit OR apache-2.0)"
>>> str(Licensing().dedup(lic_exp))
'(apache-2.0 OR mit) AND (mit OR apache-2.0)'
The apache-2.0 OR mit and mit OR apache-2.0 is technically equivalent and should be deduplicated.
The
apache-2.0 OR mitandmit OR apache-2.0is technically equivalent and should be deduplicated.