Skip to content

Commit fbc01a1

Browse files
mr-cpsafont
authored andcommitted
cleanup type hints
1 parent 4e61038 commit fbc01a1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

cwltool/provenance.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def record_process_start(self, process, job, process_run_id=None):
475475
return process_run_id
476476

477477
def start_process(self, process_name, when, process_run_id=None):
478-
# type: (Any, Text, datetime.datetime, Optional[str]) -> str
478+
# type: (Text, datetime.datetime, Optional[str]) -> str
479479
"""Record the start of each Process."""
480480
if process_run_id is None:
481481
process_run_id = uuid.uuid4().urn
@@ -1094,10 +1094,10 @@ def add_tagfile(self, path, timestamp=None):
10941094
self._file_provenance[rel_path] = {"createdOn": timestamp.isoformat()}
10951095

10961096
def _ro_aggregates(self):
1097-
# type: () -> List[Dict[str,Any]]
1097+
# type: () -> List[Dict[str, Any]]
10981098
"""Gather dictionary of files to be added to the manifest."""
10991099
def guess_mediatype(rel_path):
1100-
# type: (str) -> Dict[str,str]
1100+
# type: (str) -> Dict[str, str]
11011101
"""Return the mediatypes."""
11021102
media_types = {
11031103
# Adapted from
@@ -1157,7 +1157,7 @@ def guess_mediatype(rel_path):
11571157

11581158
aggregates = [] # type: List[Dict]
11591159
for path in self.bagged_size.keys():
1160-
aggregate_dict = {} # type: Dict[str,Any]
1160+
aggregate_dict = {} # type: Dict[str, Any]
11611161

11621162
(folder, filename) = posixpath.split(path)
11631163

@@ -1197,7 +1197,7 @@ def guess_mediatype(rel_path):
11971197
# aggregate it.
11981198
continue
11991199

1200-
rel_aggregates = {} # type: Dict[str,Any]
1200+
rel_aggregates = {} # type: Dict[str, Any]
12011201
# These are local paths like metadata/provenance - but
12021202
# we need to relativize them for our current directory for
12031203
# as we are saved in metadata/manifest.json
@@ -1302,7 +1302,7 @@ def _write_ro_manifest(self):
13021302
# type: () -> None
13031303

13041304
# Does not have to be this order, but it's nice to be consistent
1305-
manifest = OrderedDict() # type: Dict[str,Any]
1305+
manifest = OrderedDict() # type: Dict[str, Any]
13061306
manifest["@context"] = [
13071307
{"@base": "%s%s/" % (self.base_uri, _posix_path(METADATA))},
13081308
"https://w3id.org/bundle/context"
@@ -1433,7 +1433,7 @@ def add_data_file(self, from_fp, timestamp=None, content_type=None):
14331433
return rel_path
14341434

14351435
def _self_made(self, timestamp=None):
1436-
# type: (Optional[datetime.datetime]) -> Dict[str,Any]
1436+
# type: (Optional[datetime.datetime]) -> Dict[str, Any]
14371437
if timestamp is None:
14381438
timestamp = datetime.datetime.now()
14391439
return {
@@ -1530,7 +1530,7 @@ def jdefault(o):
15301530
return self.relativised_input_object
15311531

15321532
def _relativise_files(self, structure):
1533-
# type: (Any, Dict[Any, Any]) -> None
1533+
# type: (Dict[Any, Any]) -> None
15341534
"""Save any file objects into the RO and update the local paths."""
15351535
# Base case - we found a File we need to update
15361536
_logger.debug(u"[provenance] Relativising: %s", structure)
@@ -1648,7 +1648,7 @@ def checksum_copy(src_file, # type: IO
16481648
return checksum.hexdigest().lower()
16491649

16501650
def copy_job_order(job, job_order_object):
1651-
# type: (Any,Any) -> Any
1651+
# type: (Any, Any) -> Any
16521652
"""Create copy of job object for provenance."""
16531653
if not hasattr(job, "tool"):
16541654
# direct command line tool execution

0 commit comments

Comments
 (0)