Просмотр исходного кода

refactor: fix so whitespace errors

Sam Jaffe 1 месяц назад
Родитель
Сommit
ec130a956a
3 измененных файлов с 9 добавлено и 1 удалено
  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"""
 """Module containing basic Action definitions, which perform linear operations"""
+
 import pathlib
 import pathlib
 import shutil
 import shutil
 import subprocess
 import subprocess
@@ -15,6 +16,7 @@ from cipy.common import Action, Context, Outputs, Status, _validate
 
 
 class Shell(StrEnum):
 class Shell(StrEnum):
     """Enumeration of shells that this tool knows how to run natively"""
     """Enumeration of shells that this tool knows how to run natively"""
+
     SH = auto()
     SH = auto()
     BASH = auto()
     BASH = auto()
     PYTHON = 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
     A special script that is run as a node.js file, with optional post-script
     for cleaning up the environment.
     for cleaning up the environment.
     """
     """
+
     version: str = Field(default="node24", pattern="node\\d+")
     version: str = Field(default="node24", pattern="node\\d+")
     main: pathlib.Path
     main: pathlib.Path
     post: pathlib.Path | None = None
     post: pathlib.Path | None = None
@@ -50,6 +53,7 @@ class NodeScript(Action):
 
 
 class Script(Action):
 class Script(Action):
     """Action descriptor for a generic shell runner"""
     """Action descriptor for a generic shell runner"""
+
     shell: Shell | None = None
     shell: Shell | None = None
     script: str
     script: str
 
 
@@ -99,6 +103,7 @@ class Composite(Action):
     Inputs are isolated from the individual steps by default, and Outputs are
     Inputs are isolated from the individual steps by default, and Outputs are
     synthesized from the step outputs by defining an output object.
     synthesized from the step outputs by defining an output object.
     """
     """
+
     name: str = ""
     name: str = ""
     steps: list[Action] = Field(frozen=True)
     steps: list[Action] = Field(frozen=True)
     _counter: int = PrivateAttr(default=0)
     _counter: int = PrivateAttr(default=0)

+ 1 - 1
src/cipy/runner.py

@@ -65,7 +65,7 @@ def ipc(
                 self.outputs = self.__pydantic_fields__["outputs"].annotation()
                 self.outputs = self.__pydantic_fields__["outputs"].annotation()
 
 
             outdata = dotenv_values(output.name)
             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:
                 if k in outdata:
                     setattr(self.outputs, k, outdata[k])
                     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"""
 """Module containing basic Workflow definitions, which perform non-linear operations"""
+
 from typing import Any, final, override
 from typing import Any, final, override
 
 
 from pydantic import BaseModel, PrivateAttr
 from pydantic import BaseModel, PrivateAttr
@@ -8,6 +9,7 @@ from cipy.common import Action, Context, Outputs, Status, _validate
 
 
 class Job(BaseModel):
 class Job(BaseModel):
     """A wrapper for a graph node with edges"""
     """A wrapper for a graph node with edges"""
+
     id: str
     id: str
     needs: list[str] = []
     needs: list[str] = []
     action: Action
     action: Action
@@ -15,6 +17,7 @@ class Job(BaseModel):
 
 
 class Workflow(Action):
 class Workflow(Action):
     """An implementation of a flow-graph based CI workflow"""
     """An implementation of a flow-graph based CI workflow"""
+
     jobs: list[Job]
     jobs: list[Job]
     _depends: dict[str, list[str]] = PrivateAttr()
     _depends: dict[str, list[str]] = PrivateAttr()