Skip to content

Commit 5c8bb74

Browse files
committed
resolve conflict with master
1 parent 2d13271 commit 5c8bb74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ipython2cwl/cwltoolextractor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from collections import namedtuple
88
from copy import deepcopy
99
from pathlib import Path
10-
from typing import Dict, Any, List
10+
from typing import Dict, Any, List, Tuple
1111

12-
import astor
13-
import nbconvert
12+
import astor # type: ignore
13+
import nbconvert # type: ignore
1414
import yaml
15-
from nbformat.notebooknode import NotebookNode
15+
from nbformat.notebooknode import NotebookNode # type: ignore
1616

1717
from .iotypes import CWLFilePathInput, CWLBooleanInput, CWLIntInput, CWLStringInput, CWLFilePathOutput, \
1818
CWLDumpableFile, CWLDumpableBinaryFile, CWLDumpable
@@ -33,7 +33,7 @@ class AnnotatedVariablesExtractor(ast.NodeTransformer):
3333
"""AnnotatedVariablesExtractor removes the typing annotations
3434
from relative to ipython2cwl and identifies all the variables
3535
relative to an ipython2cwl typing annotation."""
36-
input_type_mapper = {
36+
input_type_mapper: Dict[Tuple[str, ...], Tuple[str, str]] = {
3737
(CWLFilePathInput.__name__,): (
3838
'File',
3939
'pathlib.Path',
@@ -186,7 +186,7 @@ def visit_Import(self, node: ast.Import) -> Any:
186186

187187
def visit_ImportFrom(self, node: ast.ImportFrom) -> Any:
188188
"""Remove ipython2cwl imports """
189-
if node.module == 'ipython2cwl' or node.module.startswith('ipython2cwl.'):
189+
if node.module == 'ipython2cwl' or (node.module is not None and node.module.startswith('ipython2cwl.')):
190190
return None
191191
return node
192192

0 commit comments

Comments
 (0)