Skip to content

Commit 06a8b02

Browse files
committed
Only import typing.Deque when type checking
1 parent a9a79de commit 06a8b02

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cwltool/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
import pkg_resources
1111
from functools import partial # pylint: disable=unused-import
1212
from typing import (IO, Any, AnyStr, Callable, # pylint: disable=unused-import
13-
Dict, Iterable, List, Optional, Text, Tuple, TypeVar, Union)
13+
Dict, Iterable, List, Optional, Text, Tuple, TypeVar, Union,
14+
TYPE_CHECKING)
15+
16+
if TYPE_CHECKING:
17+
from typing import Deque
1418

1519
import six
1620
from six.moves import urllib, zip_longest
@@ -32,7 +36,7 @@
3236

3337
DEFAULT_TMP_PREFIX = "tmp"
3438

35-
processes_to_kill = collections.deque() # type: collections.deque[subprocess.Popen]
39+
processes_to_kill = collections.deque() # type: Deque[subprocess.Popen]
3640

3741
def versionstring():
3842
# type: () -> Text

0 commit comments

Comments
 (0)