Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Dec 11, 2024
1 parent 5280368 commit ea2a0b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cwltool/cwlprov/ro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 8 additions & 6 deletions tests/test_provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit ea2a0b9

Please sign in to comment.