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

More type annotations #104

Closed florianfischer91 closed 2 years ago

florianfischer91 commented 2 years ago

This PR adds type annotations to most of the 'public' functions and methods (see #62) It also fixes some mypy issues when unpacking a fact or use clorm's Control, Model or SolveHandle classes.

The query-API is not annotated with types. Theoretically it would be possible to add type annotations by using TypeVarTuple, Generic and some clever tricks to infer also the correct type when using joins, but there is a technical limitation which makes this not possible to use with py36 (see here)