Przeglądaj źródła

refactor: fix so whitespace errors

Sam Jaffe 1 miesiąc temu
rodzic
commit
ec130a956a
3 zmienionych plików z 9 dodań i 1 usunięć
  1. 5 0
      src/cipy/action.py
  2. 1 1
      src/cipy/runner.py
  3. 3 0
      src/cipy/workflow.py

+ 5 - 0
src/cipy/action.py

@@ -1,4 +1,5 @@
 """Module containing basic Action definitions, which perform linear operations"""
+
 import pathlib
 import shutil
 import subprocess
@@ -15,6 +16,7 @@ from cipy.common import Action, Context, Outputs, Status, _validate
 
 class Shell(StrEnum):
     """Enumeration of shells that this tool knows how to run natively"""
+
     SH = auto()
     BASH = auto()
     PYTHON = auto()
@@ -25,6 +27,7 @@ class NodeScript(Action):
     A special script that is run as a node.js file, with optional post-script
     for cleaning up the environment.
     """
+
     version: str = Field(default="node24", pattern="node\\d+")
     main: pathlib.Path
     post: pathlib.Path | None = None
@@ -50,6 +53,7 @@ class NodeScript(Action):
 
 class Script(Action):
     """Action descriptor for a generic shell runner"""
+
     shell: Shell | None = None
     script: str
 
@@ -99,6 +103,7 @@ class Composite(Action):
     Inputs are isolated from the individual steps by default, and Outputs are
     synthesized from the step outputs by defining an output object.
     """
+
     name: str = ""
     steps: list[Action] = Field(frozen=True)
     _counter: int = PrivateAttr(default=0)

+ 1 - 1
src/cipy/runner.py

@@ -65,7 +65,7 @@ def ipc(
                 self.outputs = self.__pydantic_fields__["outputs"].annotation()
 
             outdata = dotenv_values(output.name)
-            for k, field in self.outputs.__pydantic_fields__.items():
+            for k in self.outputs.__pydantic_fields__:
                 if k in outdata:
                     setattr(self.outputs, k, outdata[k])
 

+ 3 - 0
src/cipy/workflow.py

@@ -1,4 +1,5 @@
 """Module containing basic Workflow definitions, which perform non-linear operations"""
+
 from typing import Any, final, override
 
 from pydantic import BaseModel, PrivateAttr
@@ -8,6 +9,7 @@ from cipy.common import Action, Context, Outputs, Status, _validate
 
 class Job(BaseModel):
     """A wrapper for a graph node with edges"""
+
     id: str
     needs: list[str] = []
     action: Action
@@ -15,6 +17,7 @@ class Job(BaseModel):
 
 class Workflow(Action):
     """An implementation of a flow-graph based CI workflow"""
+
     jobs: list[Job]
     _depends: dict[str, list[str]] = PrivateAttr()