daft-dev / daft

Render probabilistic graphical models using matplotlib
https://docs.daft-pgm.org
MIT License
675 stars 120 forks source link

Change bool flags to str option. #170

Open nstarman opened 11 months ago

nstarman commented 11 months ago

https://github.com/daft-dev/daft/blob/7e859f289ebb3f06e9d35b2a76ee4df6c8b37446/src/daft/_core.py#L570-L572

can be more succinctly represented as

kind: Literal["observed", "fixed", "alternate"] | None = None

This makes it impossible to pass more than one option and still easy to check that the option is correct.