Closed
Description
Hello everyone,
after updating to mypy 0.981, i received a mypy error for multiprocessing.Value:
from multiprocessing import Value
import ctypes
mapper = Value(ctypes.c_float, float("nan"))
mapper.value = 2.3 # error: "SynchronizedBase[c_float]" has no attribute "value"
As far as I can tell, the issue is that Value()
gives a SynchronizedBase
which is not typed to have a value
attribute. Synchronized
however would offer this attribute, as it is present in the real world.
Am I missing something or should
be changed toSynchronized
instead of SynchronizedBase
?
Update: The issue was not there in 0.971 and is now present in 0.981