ruff check fix
This commit is contained in:
@@ -88,10 +88,8 @@ from .schemas import StateFieldMetadata, state_field
|
||||
from .subgraph import async_subgraph_node, subgraph_node, subgraph_ref
|
||||
|
||||
__all__ = [
|
||||
"NodeCatalog",
|
||||
"NodeCatalogEntry",
|
||||
"AsyncRegistryHandler",
|
||||
"AuthoredReducer",
|
||||
"async_subgraph_node",
|
||||
"BoolOutput",
|
||||
"CoalesceInput",
|
||||
"ConcatInput",
|
||||
@@ -105,47 +103,48 @@ __all__ = [
|
||||
"FilterItemsPresentInput",
|
||||
"GraphPath",
|
||||
"ItemOutput",
|
||||
"MappingOutput",
|
||||
"MappingItemsOutput",
|
||||
"MappingOutput",
|
||||
"MaybeItemOutput",
|
||||
"NoOutput",
|
||||
"NodeCatalog",
|
||||
"NodeCatalogEntry",
|
||||
"NodeReturn",
|
||||
"NodeSpec",
|
||||
"Nothing",
|
||||
"PickKeyInput",
|
||||
"PickPathInput",
|
||||
"ProjectFieldsInput",
|
||||
"ReducerCatalog",
|
||||
"RenameFieldsInput",
|
||||
"RuntimeErrorInput",
|
||||
"NoOutput",
|
||||
"NodeReturn",
|
||||
"NodeSpec",
|
||||
"Nothing",
|
||||
"AsyncRegistryHandler",
|
||||
"SyncRegistryHandler",
|
||||
"SequenceInput",
|
||||
"StateFieldMetadata",
|
||||
"SyncRegistryHandler",
|
||||
"TextOutput",
|
||||
"TruthyInput",
|
||||
"ValueOutput",
|
||||
"ValuesOutput",
|
||||
"WorkflowBuilder",
|
||||
"async_subgraph_node",
|
||||
"bind_fields",
|
||||
"bind_state",
|
||||
"build_async_registry",
|
||||
"build_registry",
|
||||
"build_extract_text_content_spec",
|
||||
"build_extract_text_content_workflow",
|
||||
"bind_state",
|
||||
"build_registry",
|
||||
"coalesce",
|
||||
"concat",
|
||||
"constant",
|
||||
"context",
|
||||
"context_path",
|
||||
"default_if_none",
|
||||
"exists",
|
||||
"expr",
|
||||
"extract_field",
|
||||
"extract_text_content",
|
||||
"filter_items",
|
||||
"filter_items_present",
|
||||
"merge_maps",
|
||||
"context",
|
||||
"context_path",
|
||||
"expr",
|
||||
"exists",
|
||||
"first_item",
|
||||
"first_item_maybe",
|
||||
"first_item_or_none",
|
||||
@@ -158,16 +157,17 @@ __all__ = [
|
||||
"last_item",
|
||||
"last_item_or_none",
|
||||
"length",
|
||||
"pick_key",
|
||||
"pick_path",
|
||||
"project_fields",
|
||||
"rename_fields",
|
||||
"runtime_error",
|
||||
"merge_maps",
|
||||
"node",
|
||||
"not_",
|
||||
"outcome",
|
||||
"output_to",
|
||||
"pick_key",
|
||||
"pick_path",
|
||||
"project_fields",
|
||||
"reducer",
|
||||
"rename_fields",
|
||||
"runtime_error",
|
||||
"state",
|
||||
"state_field",
|
||||
"state_path",
|
||||
|
||||
@@ -16,7 +16,7 @@ class NodeCatalogEntry:
|
||||
output_schema: dict[str, Any]
|
||||
|
||||
@classmethod
|
||||
def from_spec(cls, spec: NodeSpec[Any, Any]) -> "NodeCatalogEntry":
|
||||
def from_spec(cls, spec: NodeSpec[Any, Any]) -> NodeCatalogEntry:
|
||||
input_schema = (
|
||||
spec.input_schema_contract or spec.input_model.model_json_schema()
|
||||
)
|
||||
@@ -38,7 +38,7 @@ class NodeCatalog:
|
||||
specs: dict[str, NodeSpec[Any, Any]]
|
||||
|
||||
@classmethod
|
||||
def from_specs(cls, *specs: NodeSpec[Any, Any]) -> "NodeCatalog":
|
||||
def from_specs(cls, *specs: NodeSpec[Any, Any]) -> NodeCatalog:
|
||||
return cls(specs={spec.name: spec for spec in specs})
|
||||
|
||||
def entries(self) -> list[NodeCatalogEntry]:
|
||||
|
||||
@@ -24,8 +24,8 @@ __all__ = [
|
||||
"AsyncRegistryHandler",
|
||||
"ContextNodeCallable",
|
||||
"InputT",
|
||||
"NodeCallable",
|
||||
"NoOutput",
|
||||
"NodeCallable",
|
||||
"NodeReturn",
|
||||
"NodeSpec",
|
||||
"Nothing",
|
||||
|
||||
@@ -22,7 +22,7 @@ from .result import NodeReturn, Nothing
|
||||
from .schema import schema_ref_for
|
||||
|
||||
|
||||
def _default_outcome(spec: "NodeSpec[Any, Any]") -> str:
|
||||
def _default_outcome(spec: NodeSpec[Any, Any]) -> str:
|
||||
return spec.outcomes[0]
|
||||
|
||||
|
||||
|
||||
@@ -55,17 +55,17 @@ __all__ = [
|
||||
"FilterItemsInput",
|
||||
"FilterItemsPresentInput",
|
||||
"ItemOutput",
|
||||
"MappingOutput",
|
||||
"MappingItemsOutput",
|
||||
"MappingOutput",
|
||||
"MaybeItemOutput",
|
||||
"PickPathInput",
|
||||
"PickKeyInput",
|
||||
"PickPathInput",
|
||||
"ProjectFieldsInput",
|
||||
"RenameFieldsInput",
|
||||
"RuntimeErrorInput",
|
||||
"SequenceInput",
|
||||
"TruthyInput",
|
||||
"TextOutput",
|
||||
"TruthyInput",
|
||||
"ValueOutput",
|
||||
"ValuesOutput",
|
||||
"coalesce",
|
||||
@@ -82,8 +82,8 @@ __all__ = [
|
||||
"last_item",
|
||||
"last_item_or_none",
|
||||
"length",
|
||||
"pick_path",
|
||||
"pick_key",
|
||||
"pick_path",
|
||||
"project_fields",
|
||||
"rename_fields",
|
||||
"runtime_error",
|
||||
|
||||
@@ -15,7 +15,7 @@ class ReducerCatalog:
|
||||
definitions: dict[str, ReducerDefinition]
|
||||
|
||||
@classmethod
|
||||
def from_reducers(cls, *reducers: AuthoredReducer) -> "ReducerCatalog":
|
||||
def from_reducers(cls, *reducers: AuthoredReducer) -> ReducerCatalog:
|
||||
return cls(
|
||||
definitions={
|
||||
reducer.definition.spec.name: reducer.definition for reducer in reducers
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
from collections.abc import Iterator, Mapping
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, TypeAdapter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user