Skip to content

Commit ee8d778

Browse files
committed
fix types
1 parent f78ebb3 commit ee8d778

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cwltool/command_line_tool.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -888,12 +888,12 @@ def remove_prefix(s: str, prefix: str) -> str:
888888
keydict[cls] = r
889889

890890
# If there are environmental variables to preserve, add it to the key
891-
env_def = keydict.get("EnvVarRequirement", {})
891+
env_def = cast(CWLObjectType, keydict.get("EnvVarRequirement", {}))
892892
env_requirement, _ = self.get_requirement("EnvVarRequirement")
893893
if env_requirement:
894-
for req in env_requirement["envDef"]:
895-
env_name = req["envName"]
896-
env_value = req["envValue"]
894+
for req in cast(list[CWLObjectType], env_requirement["envDef"]):
895+
env_name = cast(str, req["envName"])
896+
env_value = cast(str, req["envValue"])
897897
env_def[env_name] = env_value
898898
if runtimeContext.preserve_environment is not None:
899899
# This could either be a list or a dictionary

0 commit comments

Comments
 (0)