Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 2, 2024
1 parent 613b291 commit de1afdb
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 27 deletions.
6 changes: 3 additions & 3 deletions capsul/database/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ def job_finished_json(
sql, [engine_id, execution_id, waiting_id]
).fetchone()
waiting_job = json.loads(row[0])
waiting_job[
"return_code"
] = "Not started because de dependent job failed"
waiting_job["return_code"] = (
"Not started because de dependent job failed"
)
sql = "UPDATE capsul_job SET job=? WHERE engine_id=? AND execution_id=? AND job_id=?"
sqlite.execute(
sql, [json.dumps(waiting_job), engine_id, execution_id, job_id]
Expand Down
12 changes: 6 additions & 6 deletions capsul/execution_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ def _create_jobs(
field.metadata("write", False)
and field.name in parameters.content
):
nodes_dict.setdefault(dest_node.name, {})[
plug_name
] = parameters.content[field.name]
nodes_dict.setdefault(dest_node.name, {})[plug_name] = (
parameters.content[field.name]
)
# if debug: print('-> add write in nodes_dict')
else:
parameters.content[field.name] = nodes_dict.get(
Expand Down Expand Up @@ -563,9 +563,9 @@ def _create_jobs(
else:
suffix = ""
uuid = str(uuid4())
value[
i
] = f"{prefix}.{field.name}_{i}_{uuid}{suffix}"
value[i] = (
f"{prefix}.{field.name}_{i}_{uuid}{suffix}"
)
# print('generate tmp:', value)
if value is undefined:
value = process.getattr(field.name, None)
Expand Down
3 changes: 1 addition & 2 deletions capsul/pipeline/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
""" Pipelining elements for CAPSUL
"""
"""Pipelining elements for CAPSUL"""
3 changes: 1 addition & 2 deletions capsul/pipeline/custom_nodes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
""" This module is a placeholder for custom nodes types. Custom nodes can be used as pipeline nodes, do not represent a process (a physical job in a computing resource), but can help setting things up in a pipeline structure or parameters.
"""
"""This module is a placeholder for custom nodes types. Custom nodes can be used as pipeline nodes, do not represent a process (a physical job in a computing resource), but can help setting things up in a pipeline structure or parameters."""
1 change: 0 additions & 1 deletion capsul/pipeline/custom_nodes/loo_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
------------------------
"""


from soma.controller import Any, Controller, type_from_str

from capsul.process.node import Node
Expand Down
1 change: 0 additions & 1 deletion capsul/pipeline/custom_nodes/map_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
------------------------
"""


from soma.controller import Controller, File, field, type_from_str, undefined

from capsul.process.node import Node, Plug
Expand Down
2 changes: 1 addition & 1 deletion capsul/pipeline/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Pipeline main class module
"""Pipeline main class module
Classes
=======
Expand Down
1 change: 0 additions & 1 deletion capsul/pipeline/test/test_optional_output_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def execute(self, context=None):


class MyPipelineWithOptOut(Pipeline):

"""Simple Pipeline to test the OptionalOutputSwitch Node"""

def pipeline_definition(self):
Expand Down
3 changes: 1 addition & 2 deletions capsul/process/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
""" capsul.process module
"""
"""capsul.process module"""
2 changes: 1 addition & 1 deletion capsul/process/process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Process main class and infrastructure
"""Process main class and infrastructure
Classes
-------
Expand Down
1 change: 0 additions & 1 deletion capsul/qt_apps/utils/fill_treectrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
----------------------
"""


# Soma import
from soma.qt_gui.qt_backend import QtGui

Expand Down
6 changes: 3 additions & 3 deletions capsul/test/test_fake_morphologist.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ def setUp(self):
"version": version,
"standalone": True,
}
config["builtin"].setdefault("spm", {})[
f"spm_{version}_standalone"
] = fakespm_config
config["builtin"].setdefault("spm", {})[f"spm_{version}_standalone"] = (
fakespm_config
)

matlab_config = {
"mcr_directory": str(tmp / "software" / "matlab"),
Expand Down
6 changes: 3 additions & 3 deletions capsul/test/test_tiny_morphologist.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ def setUp(self):
"directory": str(fakespm),
"version": version,
}
config["builtin"].setdefault("fakespm", {})[
f"fakespm_{version}"
] = fakespm_config
config["builtin"].setdefault("fakespm", {})[f"fakespm_{version}"] = (
fakespm_config
)

# Create a configuration file
self.config_file = tmp / "capsul_config.json"
Expand Down

0 comments on commit de1afdb

Please sign in to comment.