Hello, I wanted to make a feature request I have recently migrated from concurrent futures to pebble since pebble is better. However, I have lost the ability to type check as the types are passed through in pebble. If you are open to it I would like to override the way that submit works so it has the same typing properties as concurrent futures. I have integrated an example of what I mean below.
from concurrent.futures import ProcessPoolExecutor
from pebble import ProcessPool
def cool(x: int):
return x
if __name__ == "__main__":
with ProcessPoolExecutor() as pool:
pool.submit(cool, 1).result() # ok
pool.submit(cool, "a").result() # mypy flags this
with ProcessPool() as pool:
pool.submit(cool, None, 1).result() # ok
pool.submit(cool, None, "a").result() # should fail but doesn't
Also the type after calling result() is Any in pebble whereas it is the return type of the function in concurrent futures.
Hello, I wanted to make a feature request I have recently migrated from concurrent futures to pebble since pebble is better. However, I have lost the ability to type check as the types are passed through in pebble. If you are open to it I would like to override the way that submit works so it has the same typing properties as concurrent futures. I have integrated an example of what I mean below.
Also the type after calling result() is Any in pebble whereas it is the return type of the function in concurrent futures.