mozilla / filter-cascade

A python filter cascade implementation
Mozilla Public License 2.0
6 stars 5 forks source link

Add specific exception handling around invalid error rates #23

Closed jcjones closed 4 years ago

jcjones commented 4 years ago

Error rates have to be between 0 and 1, exclusive, and values outside of that are invalid. This patch adds such checks, as well as some more test cases.

The exception message suggests the use of set_crlite_error_rates, which avoids invalid error rates by pre-checking whether the include and exclude sets require inverted logic -- the most common reason for things to go awry.

Version bumps to v0.4.1.