multiscale / muscle3

The third major version of the MUltiScale Coupling Library and Environment
Apache License 2.0
25 stars 13 forks source link

mypy doesn't see InstanceFlags #275

Open LourensVeen opened 8 months ago

LourensVeen commented 8 months ago

We're using a clever bit of metaprogramming to import the values of the InstanceFlags class into the libmuscle package namespace. Unfortunately, mypy doesn't understand this, as a result of which

from libmuscle import KEEPS_NO_STATE_FOR_NEXT_USE

gives

error: Module "libmuscle" has no attribute "KEEPS_NO_STATE_FOR_NEXT_USE"  [attr-defined]

We'll probably have to export this somewhat more manually.