Skip to content

Commit d4d42aa

Browse files
committed
misc type improvements for mypy3
1 parent df59833 commit d4d42aa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cwltool/job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ def _job_popen(
460460
job_script_contents = SHELL_COMMAND_TEMPLATE
461461

462462
env_copy = {}
463+
key = None # type: Union[Text, bytes]
463464
for key in env:
464465
key = key.encode("utf-8")
465466
env_copy[key] = env[key]

cwltool/load_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def validate_document(document_loader, # type: Loader
137137
preprocess_only=False, # type: bool
138138
fetcher_constructor=None,
139139
skip_schemas=None
140-
# type: Callable[[Dict[unicode, unicode], requests.sessions.Session], Fetcher]
140+
# type: Callable[[Dict[Text, Text], requests.sessions.Session], Fetcher]
141141
):
142142
# type: (...) -> Tuple[Loader, Names, Union[Dict[Text, Any], List[Dict[Text, Any]]], Dict[Text, Any], Text]
143143
"""Validate a CWL document."""

cwltool/pack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def find_run(d, loadref, runs): # type: (Any, Callable[[Text, Text], Union[Dict
2828
for s in d:
2929
find_run(s, loadref, runs)
3030
elif isinstance(d, dict):
31-
if "run" in d and isinstance(d["run"], six.string_types)):
31+
if "run" in d and isinstance(d["run"], six.string_types):
3232
if d["run"] not in runs:
3333
runs.add(d["run"])
3434
find_run(loadref(None, d["run"]), loadref, runs)
@@ -42,7 +42,7 @@ def find_ids(d, ids): # type: (Any, Set[Text]) -> None
4242
find_ids(s, ids)
4343
elif isinstance(d, dict):
4444
for i in ("id", "name"):
45-
if i in d and isinstance(d[i], six.string_types)):
45+
if i in d and isinstance(d[i], six.string_types):
4646
ids.add(d[i])
4747
for s in d.values():
4848
find_ids(s, ids)

0 commit comments

Comments
 (0)