openelections / clarify

Discover and parse results for jurisdictions that use Clarity-based election systems.
MIT License
38 stars 21 forks source link

Stricter validation of constructor parameters #39

Open carbonphyber opened 3 years ago

carbonphyber commented 3 years ago

I find libraries that raising Exceptions early and often when users pass in invalid/unsupported much more pleasant to work with.

I'm developing a partial rewrite of the jurisdiction.py constructor to raise exceptions if:

Since raising Exceptions in a potential future version where none are raised now is a breaking change, I'm submitting this Issue to gather feedback before submitting the PR.

carbonphyber commented 3 years ago

Fixed in #40