Unexplained behavior when instantiating a Population Probability
Closed this issue · 3 comments
rjc955 commented
The next two commented-out lines produce a mypy error:
pi1 = Population("pi1")
test_1_district_probability = PP[pi1](Z | X1)
Here's the error:
error: Type application targets a non-generic function or class [misc]
test_transport.py
uses a similar syntax and does not trigger the error,
so I'm probably missing something simple.
The next line does not trigger an error:
test_1_district_probability = PP[Population("pi1")](Z | X1)
djinnome commented
To be clear, this does not trigger an error in the python interpreter, only in mypy, which may suggest a bug in mypy?
djinnome commented
Now the problem is no longer being reported by mypy, so maybe the problem has been fixed?