diff --git a/cwltool/cwlprov/ro.py b/cwltool/cwlprov/ro.py index 98295f512..39a06a473 100644 --- a/cwltool/cwlprov/ro.py +++ b/cwltool/cwlprov/ro.py @@ -10,7 +10,7 @@ from collections.abc import MutableMapping, MutableSequence from pathlib import Path, PurePosixPath from socket import getfqdn -from typing import TYPE_CHECKING, IO, Any, Optional, Union, cast +from typing import IO, TYPE_CHECKING, Any, Optional, Union, cast import prov.model as provM from prov.model import ProvDocument diff --git a/tests/test_provenance.py b/tests/test_provenance.py index a49b0157e..94ed62603 100644 --- a/tests/test_provenance.py +++ b/tests/test_provenance.py @@ -43,8 +43,10 @@ def cwltool(tmp_path: Path, *args: Any) -> Path: new_args = [ "--enable-user-provenance", "--enable-host-provenance", - "--orcid", TEST_ORCID, - "--provenance", str(prov_folder) + "--orcid", + TEST_ORCID, + "--provenance", + str(prov_folder), ] new_args.extend(args) # Run within a temporary directory to not pollute git checkout @@ -519,9 +521,9 @@ def check_prov( tool_agents = set(g.subjects(RDF.type, PROV.SoftwareAgent)) n_all_agents = 2 + len(tool_agents) agents = set(g.subjects(RDF.type, PROV.Agent)) - assert len(agents) == n_all_agents, ( - "There should be 1 agent per tool (engine), 1 user agent, and 1 cwltool agent" - ) + assert ( + len(agents) == n_all_agents + ), "There should be 1 agent per tool (engine), 1 user agent, and 1 cwltool agent" agents.remove(person) agents.remove(engine) # the main tool remain_agents = agents - tool_agents @@ -530,7 +532,7 @@ def check_prov( assert ( cwltool_agent, PROV.actedOnBehalfOf, - person + person, ) in g, "Association of cwltool agent acting for user is missing" if single_tool: