Skip to content

Commit

Permalink
Bump black from 23.9.1 to 24.10.0 (#129)
Browse files Browse the repository at this point in the history
Bumps [black](https://github.com/psf/black) from 23.9.1 to 24.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.9.1...24.10.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Dec 7, 2024
1 parent f0a2bbe commit 31efa1f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 32 deletions.
6 changes: 3 additions & 3 deletions jupyter_workflow/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ async def _async_poll_for_workflow_reply(
if msg["parent_header"].get("msg_id") == msg_id:
if self.record_timing:
for cell in cells:
cell["metadata"]["execution"][
"shell.execute_reply"
] = timestamp(msg)
cell["metadata"]["execution"]["shell.execute_reply"] = (
timestamp(msg)
)
await asyncio.wait_for(task_poll_output_msgs, self.iopub_timeout)
task_poll_kernel_alive.cancel()
return msg
Expand Down
4 changes: 1 addition & 3 deletions jupyter_workflow/ipython/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ def init_metadata(self, parent):
workflow_config = (
parent["metadata"]
if "workflow" in parent["metadata"]
else parent["content"]
if "workflow" in parent["content"]
else None
else parent["content"] if "workflow" in parent["content"] else None
)
if workflow_config is not None:
try:
Expand Down
6 changes: 3 additions & 3 deletions jupyter_workflow/streamflow/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ async def process(
connector=self._get_connector(connector, job),
job=job,
locations=await self._get_locations(connector, job),
output_directory=self.target.workdir
if self.target
else job.output_directory,
output_directory=(
self.target.workdir if self.target else job.output_directory
),
user_ns=command_output.user_ns,
value=self.value,
value_from=self.value_from,
Expand Down
9 changes: 4 additions & 5 deletions jupyter_workflow/streamflow/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ async def run(self):
@abstractmethod
async def process_input(
self, job: Job, user_ns: MutableMapping[str, Any], token_value: Any
) -> Token:
...
) -> Token: ...


class JupyterFileInputInjectorStep(JupyterInputInjectorStep):
Expand Down Expand Up @@ -337,9 +336,9 @@ def add_output_port(
self, name: str, port: Port, output_processor: CommandOutputProcessor = None
) -> None:
super().add_output_port(name, port)
self.output_processors[
name
] = output_processor or DefaultCommandOutputProcessor(name, self.workflow)
self.output_processors[name] = (
output_processor or DefaultCommandOutputProcessor(name, self.workflow)
)

def get_output_context_port(self) -> ProgramContextPort:
return cast(ProgramContextPort, self.get_output_port("__context__"))
Expand Down
36 changes: 19 additions & 17 deletions jupyter_workflow/streamflow/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,24 +780,24 @@ async def _translate_streamflow_cell(
# If type is equal to `file`, it refers to a file path in the remote resource
if element_type == "file":
# Add file output processor to the execute step
step.output_processors[
name
] = JupyterFileCommandOutputProcessor(
name=name,
workflow=workflow,
value=element.get("value"),
value_from=element.get("valueFrom"),
step.output_processors[name] = (
JupyterFileCommandOutputProcessor(
name=name,
workflow=workflow,
value=element.get("value"),
value_from=element.get("valueFrom"),
)
)
# If type is equal to `name` or `env`, it refers to a variable
elif element_type in ["name", "env"]:
# Add name output processor to the execute step
step.output_processors[
name
] = JupyterNameCommandOutputProcessor(
name=name,
workflow=workflow,
value=element.get("value"),
value_from=element.get("valueFrom", name),
step.output_processors[name] = (
JupyterNameCommandOutputProcessor(
name=name,
workflow=workflow,
value=element.get("value"),
value_from=element.get("valueFrom", name),
)
)
# If type is equal to `control`, simply add an empty dependency
elif element_type == "control":
Expand All @@ -816,9 +816,11 @@ async def _translate_streamflow_cell(
cell_id=metadata["cell_id"],
name=name,
port=self.output_ports[name],
depth=len(scatter_inputs)
if scatter_method == "cartesian"
else 1,
depth=(
len(scatter_inputs)
if scatter_method == "cartesian"
else 1
),
workflow=workflow,
)
# Add list join transformer
Expand Down
2 changes: 1 addition & 1 deletion lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==23.9.1
black==24.10.0
codespell==2.3.0
flake8-bugbear==23.9.16
pyupgrade==3.17.0

0 comments on commit 31efa1f

Please sign in to comment.