@@ -475,7 +475,7 @@ def record_process_start(self, process, job, process_run_id=None):
475
475
return process_run_id
476
476
477
477
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
479
479
"""Record the start of each Process."""
480
480
if process_run_id is None :
481
481
process_run_id = uuid .uuid4 ().urn
@@ -1094,10 +1094,10 @@ def add_tagfile(self, path, timestamp=None):
1094
1094
self ._file_provenance [rel_path ] = {"createdOn" : timestamp .isoformat ()}
1095
1095
1096
1096
def _ro_aggregates (self ):
1097
- # type: () -> List[Dict[str,Any]]
1097
+ # type: () -> List[Dict[str, Any]]
1098
1098
"""Gather dictionary of files to be added to the manifest."""
1099
1099
def guess_mediatype (rel_path ):
1100
- # type: (str) -> Dict[str,str]
1100
+ # type: (str) -> Dict[str, str]
1101
1101
"""Return the mediatypes."""
1102
1102
media_types = {
1103
1103
# Adapted from
@@ -1157,7 +1157,7 @@ def guess_mediatype(rel_path):
1157
1157
1158
1158
aggregates = [] # type: List[Dict]
1159
1159
for path in self .bagged_size .keys ():
1160
- aggregate_dict = {} # type: Dict[str,Any]
1160
+ aggregate_dict = {} # type: Dict[str, Any]
1161
1161
1162
1162
(folder , filename ) = posixpath .split (path )
1163
1163
@@ -1197,7 +1197,7 @@ def guess_mediatype(rel_path):
1197
1197
# aggregate it.
1198
1198
continue
1199
1199
1200
- rel_aggregates = {} # type: Dict[str,Any]
1200
+ rel_aggregates = {} # type: Dict[str, Any]
1201
1201
# These are local paths like metadata/provenance - but
1202
1202
# we need to relativize them for our current directory for
1203
1203
# as we are saved in metadata/manifest.json
@@ -1302,7 +1302,7 @@ def _write_ro_manifest(self):
1302
1302
# type: () -> None
1303
1303
1304
1304
# 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]
1306
1306
manifest ["@context" ] = [
1307
1307
{"@base" : "%s%s/" % (self .base_uri , _posix_path (METADATA ))},
1308
1308
"https://w3id.org/bundle/context"
@@ -1433,7 +1433,7 @@ def add_data_file(self, from_fp, timestamp=None, content_type=None):
1433
1433
return rel_path
1434
1434
1435
1435
def _self_made (self , timestamp = None ):
1436
- # type: (Optional[datetime.datetime]) -> Dict[str,Any]
1436
+ # type: (Optional[datetime.datetime]) -> Dict[str, Any]
1437
1437
if timestamp is None :
1438
1438
timestamp = datetime .datetime .now ()
1439
1439
return {
@@ -1530,7 +1530,7 @@ def jdefault(o):
1530
1530
return self .relativised_input_object
1531
1531
1532
1532
def _relativise_files (self , structure ):
1533
- # type: (Any, Dict[Any, Any]) -> None
1533
+ # type: (Dict[Any, Any]) -> None
1534
1534
"""Save any file objects into the RO and update the local paths."""
1535
1535
# Base case - we found a File we need to update
1536
1536
_logger .debug (u"[provenance] Relativising: %s" , structure )
@@ -1648,7 +1648,7 @@ def checksum_copy(src_file, # type: IO
1648
1648
return checksum .hexdigest ().lower ()
1649
1649
1650
1650
def copy_job_order (job , job_order_object ):
1651
- # type: (Any,Any) -> Any
1651
+ # type: (Any, Any) -> Any
1652
1652
"""Create copy of job object for provenance."""
1653
1653
if not hasattr (job , "tool" ):
1654
1654
# direct command line tool execution
0 commit comments