What is the correct way to type hint a homogenous Queue in Python3.6 (especially for PyCharm)?
Old Question, but I just found
P: "Queue[Path]" = Queue()
to work with both queue.Queue
and multiprocessing.Queue
in PyCharm
TypeVar
should have a name.
T = TypeVar("T")
fixes the problem.