potassco / clorm

🗃️ A Python ORM-like interface for the Clingo Answer Set Programming (ASP) reasoner
https://clorm.readthedocs.io
MIT License
52 stars 5 forks source link

Cleanup noclingo #94

Closed florianfischer91 closed 2 years ago

florianfischer91 commented 2 years ago

With this PR typechecking for functions Function, String, Number, Tuple_ and set_symbol_mode should now be handled properly. Before always the last function definition was used by the type-checker (the ones when noclingo is disabled). This leads to a wrong return type annotation (Symbol instead of AnySymbol) and when calling set_symbol_mode the type-checker mentioned unreachable code after the function call (due to raising a RuntimeError).

PR also adds typehints to noclingo.py