Skip to content

Commit

Permalink
mypy 1.6.0 fixes, test new type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Oct 11, 2023
1 parent ecb36c5 commit cfb4ead
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def is_streamable(file: str) -> bool:
return False
for inp in self.joborder.values():
if isinstance(inp, dict) and inp.get("location", None) == file:
return inp.get("streamable", False)
return cast(bool, inp.get("streamable", False))

Check warning on line 193 in cwltool/job.py

View check run for this annotation

Codecov / codecov/patch

cwltool/job.py#L193

Added line #L193 was not covered by tests
return False

for knownfile in self.pathmapper.files():
Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ show_column_numbers = true
show_error_codes = true
pretty = true
warn_unreachable = True
new_type_inference = True

[mypy-galaxy.tool_util.*]
ignore_missing_imports = True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"cwltool/workflow.py",
]

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

opt_level = os.getenv("MYPYC_OPT_LEVEL", "3")
ext_modules = mypycify(mypyc_targets, opt_level=opt_level)
Expand Down

0 comments on commit cfb4ead

Please sign in to comment.