Open grayfall opened 6 years ago
So if you type using just Integral
, it works fine:
@runtime_validation
def foo(x: Integral) -> None:
return
Meaning this is some weird interaction between NamedTuple
and Integral
.... Will keep digging.
I think I have nailed this issue. I used to create typed NamedTuples using exec
from a string template. Unfortunately, it was hard to provide correct context for exec
under such an approach. I have scraped it. It should work in dev
now.
Please remember that I have updated the dev
installation instructions:
git clone https://github.com/RussBaz/enforce.git@dev
cd enforce
# Please use a virtual environment before proceeding!
pip install -r requirements.txt
pip install -e .
I get an
NameError
when I try to use ABCs from thenumbers
module, e.g.Using these annotations in any function gives me: