Make multiprocessing pipes generic
A while ago I was toying with the idea of using multiprocessing for a long-running task, and got annoyed that I could not specify a type for my interfacing pipes. So I hashed up a quick generic multiprocessing stub for my need.
I didn't end up going that route, but since I already did some typing work, figure I'd publish it rather than throw it away. Idk if the TypeVar variance is correct, please advise.
Diff from mypy_primer, showing the effect of this PR on open source code:
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/parallel.py: note: In member "add_task" of class "ParallelTasks":
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "precv" [var-annotated]
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "psend" [var-annotated]
Diff from mypy_primer, showing the effect of this PR on open source code:
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/parallel.py: note: In member "add_task" of class "ParallelTasks":
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "precv" [var-annotated]
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "psend" [var-annotated]
Diff from mypy_primer, showing the effect of this PR on open source code:
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/parallel.py: note: In member "add_task" of class "ParallelTasks":
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "precv" [var-annotated]
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "psend" [var-annotated]
Diff from mypy_primer, showing the effect of this PR on open source code:
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/parallel.py: note: In member "add_task" of class "ParallelTasks":
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "precv" [var-annotated]
+ sphinx/util/parallel.py:92:24: error: Need type annotation for "psend" [var-annotated]
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
Marking as deferred until https://github.com/python/typeshed/issues/11422
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
TypeVar defaults are now available in typeshed.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉