diff --git a/cwltool/process.py b/cwltool/process.py index b1178146b..18017d523 100644 --- a/cwltool/process.py +++ b/cwltool/process.py @@ -32,6 +32,7 @@ ) from cwl_utils import expression +from mypy_extensions import mypyc_attr from pkg_resources import resource_stream from rdflib import Graph from ruamel.yaml.comments import CommentedMap, CommentedSeq @@ -535,6 +536,7 @@ def eval_resource( FILE_COUNT_WARNING = 5000 +@mypyc_attr(allow_interpreted_subclasses=True) class Process(HasReqsHints, metaclass=abc.ABCMeta): def __init__( self, toolpath_object: CommentedMap, loadingContext: LoadingContext diff --git a/cwltool/utils.py b/cwltool/utils.py index 824aeb843..697b1c2bd 100644 --- a/cwltool/utils.py +++ b/cwltool/utils.py @@ -39,7 +39,7 @@ import requests from cachecontrol import CacheControl from cachecontrol.caches import FileCache -from mypy_extensions import TypedDict +from mypy_extensions import TypedDict, mypyc_attr from schema_salad.exceptions import ValidationException from schema_salad.ref_resolver import Loader from typing_extensions import TYPE_CHECKING, Deque @@ -502,6 +502,7 @@ def create_tmp_dir(tmpdir_prefix: str) -> str: return tempfile.mkdtemp(prefix=tmp_prefix, dir=tmp_dir) +@mypyc_attr(allow_interpreted_subclasses=True) class HasReqsHints: """Base class for get_requirement()."""