Skip to content

Commit 72e4ffb

Browse files
fmigneaultmr-c
andauthored
allow mypy process type to be used as by interpreted subclasses (#1746)
Co-authored-by: Michael R. Crusoe <[email protected]>
1 parent 6f0e1d9 commit 72e4ffb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cwltool/process.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
)
3333

3434
from cwl_utils import expression
35+
from mypy_extensions import mypyc_attr
3536
from pkg_resources import resource_stream
3637
from rdflib import Graph
3738
from ruamel.yaml.comments import CommentedMap, CommentedSeq
@@ -535,6 +536,7 @@ def eval_resource(
535536
FILE_COUNT_WARNING = 5000
536537

537538

539+
@mypyc_attr(allow_interpreted_subclasses=True)
538540
class Process(HasReqsHints, metaclass=abc.ABCMeta):
539541
def __init__(
540542
self, toolpath_object: CommentedMap, loadingContext: LoadingContext

cwltool/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import requests
4040
from cachecontrol import CacheControl
4141
from cachecontrol.caches import FileCache
42-
from mypy_extensions import TypedDict
42+
from mypy_extensions import TypedDict, mypyc_attr
4343
from schema_salad.exceptions import ValidationException
4444
from schema_salad.ref_resolver import Loader
4545
from typing_extensions import TYPE_CHECKING, Deque
@@ -502,6 +502,7 @@ def create_tmp_dir(tmpdir_prefix: str) -> str:
502502
return tempfile.mkdtemp(prefix=tmp_prefix, dir=tmp_dir)
503503

504504

505+
@mypyc_attr(allow_interpreted_subclasses=True)
505506
class HasReqsHints:
506507
"""Base class for get_requirement()."""
507508

0 commit comments

Comments
 (0)