Skip to content

Commit a8dea5e

Browse files
miggaiowskiambv
authored andcommitted
Update types for ThreadPoolExecutor for py3.6 (#1414)
* Update types for ThreadPoolExecutor for py3.6 * Removed Optional from ThreadPoolExecutor thread_name_prefix argument
1 parent 1c84982 commit a8dea5e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
from typing import Optional
22
from ._base import Executor, Future
3+
import sys
34

45
class ThreadPoolExecutor(Executor):
5-
def __init__(self, max_workers: Optional[int] = ...) -> None: ...
6+
if sys.version_info >= (3, 6):
7+
def __init__(self, max_workers: Optional[int] = ...,
8+
thread_name_prefix: str = ...) -> None: ...
9+
else:
10+
def __init__(self, max_workers: Optional[int] = ...) -> None: ...

0 commit comments

Comments
 (0)