potassco / clingo

🤔 A grounder and solver for logic programs.
https://potassco.org/clingo
MIT License
599 stars 79 forks source link

Optional #454

Closed jorgefandinno closed 11 months ago

jorgefandinno commented 11 months ago

Several of these arguments default to None but if you pass None to them, mypy will complaing. Should they be changed to Optional[...]?

https://github.com/potassco/clingo/blob/ba5ec6982fe39b8d7c579803a28a2b0cb55b655c/libpyclingo/clingo/ast.py#L1252-L1258

Same here:

https://github.com/potassco/clingo/blob/ba5ec6982fe39b8d7c579803a28a2b0cb55b655c/libpyclingo/clingo/ast.py#L1315-L1321

rkaminsk commented 11 months ago

The Optional around the control object is an omission. It used to be possible to set a Callable to None. This is no longer the case so it should also be wrapped.