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

Postponned type annotations with inner-classes #135

Closed daveraja closed 6 months ago

daveraja commented 6 months ago

With Clorm v1.5.0 postponed type annotations don't work when you have inner classes. For example I think the following will break:

from __future__ import annotations

from clorm import Predicate

class Outer(Predicate):

       class Inner(Predicate):
              a: int

       x: Inner
daveraja commented 6 months ago

Fixed in version 1.5.1