From 50577b332db0c4f4621cecdcbe75350f80b262d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 08:17:14 +0000 Subject: [PATCH 1/2] Bump mypy from 1.16.1 to 1.17.0 Bumps [mypy](https://github.com/python/mypy) from 1.16.1 to 1.17.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.16.1...v1.17.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.17.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mypy-requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy-requirements.txt b/mypy-requirements.txt index 3523889d6..9d8546a5f 100644 --- a/mypy-requirements.txt +++ b/mypy-requirements.txt @@ -1,4 +1,4 @@ -mypy==1.16.1 # also update pyproject.toml +mypy==1.17.0 # also update pyproject.toml ruamel.yaml>=0.16.0,<0.19 cwl-utils>=0.32 cwltest diff --git a/pyproject.toml b/pyproject.toml index b5c4648c3..75d4b91c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "setuptools>=45", "setuptools_scm[toml]>=8.0.4,<9", - "mypy==1.16.1", # also update mypy-requirements.txt + "mypy==1.17.0", # also update mypy-requirements.txt "types-requests", "types-psutil", "ruamel.yaml>=0.16.0,<0.19", From 34915eac27430695a970ab389ece4eacf11732b3 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 15 Jul 2025 12:22:41 +0200 Subject: [PATCH 2/2] workaround for a mypy 1.17 regression --- cwltool/command_line_tool.py | 43 +++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/cwltool/command_line_tool.py b/cwltool/command_line_tool.py index ec478fafe..d98648769 100644 --- a/cwltool/command_line_tool.py +++ b/cwltool/command_line_tool.py @@ -16,7 +16,7 @@ from enum import Enum from functools import cmp_to_key, partial from re import Pattern -from typing import TYPE_CHECKING, Any, Optional, TextIO, Union, cast +from typing import TYPE_CHECKING, Any, Iterable, Optional, TextIO, Union, cast from mypy_extensions import mypyc_attr from ruamel.yaml.comments import CommentedMap, CommentedSeq @@ -1322,26 +1322,29 @@ def collect_output( key=cmp_to_key(locale.strcoll), ) r.extend( - [ - { - "location": g, - "path": fs_access.join( - builder.outdir, - urllib.parse.unquote(g[len(prefix[0]) + 1 :]), - ), - "basename": decoded_basename, - "nameroot": os.path.splitext(decoded_basename)[0], - "nameext": os.path.splitext(decoded_basename)[1], - "class": "File" if fs_access.isfile(g) else "Directory", - } - for g, decoded_basename in zip( - sorted_glob_result, - map( - lambda x: os.path.basename(urllib.parse.unquote(x)), + cast( + Iterable[CWLOutputType], + [ + { + "location": g, + "path": fs_access.join( + builder.outdir, + urllib.parse.unquote(g[len(prefix[0]) + 1 :]), + ), + "basename": decoded_basename, + "nameroot": os.path.splitext(decoded_basename)[0], + "nameext": os.path.splitext(decoded_basename)[1], + "class": "File" if fs_access.isfile(g) else "Directory", + } + for g, decoded_basename in zip( sorted_glob_result, - ), - ) - ] + map( + lambda x: os.path.basename(urllib.parse.unquote(x)), + sorted_glob_result, + ), + ) + ], + ) ) except OSError as e: _logger.warning(str(e), exc_info=builder.debug)