Skip to content

Commit dd62ad9

Browse files
committed
mypy 1.6.0 fixes, test new type inference
1 parent 2e4910a commit dd62ad9

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

cwltool/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def is_streamable(file: str) -> bool:
190190
return False
191191
for inp in self.joborder.values():
192192
if isinstance(inp, dict) and inp.get("location", None) == file:
193-
return inp.get("streamable", False)
193+
return cast(bool, inp.get("streamable", False))
194194
return False
195195

196196
for knownfile in self.pathmapper.files():

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ show_column_numbers = true
55
show_error_codes = true
66
pretty = true
77
warn_unreachable = True
8+
new_type_inference = True
89

910
[mypy-galaxy.tool_util.*]
1011
ignore_missing_imports = True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"cwltool/workflow.py",
8686
]
8787

88-
from mypyc.build import mypycify # type: ignore[import]
88+
from mypyc.build import mypycify # type: ignore[import-untyped]
8989

9090
opt_level = os.getenv("MYPYC_OPT_LEVEL", "3")
9191
ext_modules = mypycify(mypyc_targets, opt_level=opt_level)

0 commit comments

Comments
 (0)