style(robot/-and-typings/numpy): fix style problems found by ruff check
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 18s
CI / quality (pull_request) Failing after 15s
CI / behave (3.11) (pull_request) Failing after 11s
CI / behave (3.12) (pull_request) Failing after 11s
CI / behave (3.13) (pull_request) Failing after 13s
CI / docker (pull_request) Has been skipped
CI / helm (pull_request) Has been skipped
CI / build (pull_request) Failing after 14s
CI / coverage (pull_request) Failing after 15s
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 18s
CI / quality (pull_request) Failing after 15s
CI / behave (3.11) (pull_request) Failing after 11s
CI / behave (3.12) (pull_request) Failing after 11s
CI / behave (3.13) (pull_request) Failing after 13s
CI / docker (pull_request) Has been skipped
CI / helm (pull_request) Has been skipped
CI / build (pull_request) Failing after 14s
CI / coverage (pull_request) Failing after 15s
This commit is contained in:
@@ -15,7 +15,7 @@ from typing import Any
|
||||
src_dir = Path(__file__).parent.parent / "src"
|
||||
sys.path.insert(0, str(src_dir))
|
||||
|
||||
from cleveragents.agents.context_analysis import (
|
||||
from cleveragents.agents.context_analysis import ( # noqa: E402
|
||||
ContextAnalysisAgent,
|
||||
ContextAnalysisState,
|
||||
)
|
||||
|
||||
@@ -12,8 +12,8 @@ SRC_DIR = PROJECT_ROOT / "src"
|
||||
if str(SRC_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(SRC_DIR))
|
||||
|
||||
from cleveragents.agents.plan_generation import PlanGenerationGraph
|
||||
from cleveragents.domain.models.core import Context
|
||||
from cleveragents.agents.plan_generation import PlanGenerationGraph # noqa: E402
|
||||
from cleveragents.domain.models.core import Context # noqa: E402
|
||||
|
||||
|
||||
def run_context_summary() -> None:
|
||||
|
||||
@@ -31,12 +31,17 @@ def fix_python_indentation(script: str) -> str:
|
||||
# Check if we should dedent from a class/function body back to module level
|
||||
# This happens when we see import, class, or a top-level statement after a class
|
||||
is_module_level_statement = False
|
||||
if indent_level > 0 and block_stack:
|
||||
# If we're inside a class and see an import, we need to dedent
|
||||
if stripped.startswith(("import ", "from ")) or (
|
||||
stripped.startswith("class ") and block_stack[-1] == "class"
|
||||
):
|
||||
is_module_level_statement = True
|
||||
|
||||
# If we're inside a class and see an import, we need to dedent
|
||||
if (
|
||||
indent_level > 0
|
||||
and block_stack
|
||||
and (
|
||||
stripped.startswith(("import ", "from "))
|
||||
or (stripped.startswith("class ") and block_stack[-1] == "class")
|
||||
)
|
||||
):
|
||||
is_module_level_statement = True
|
||||
|
||||
if is_dedenting and block_stack:
|
||||
if stripped.startswith(("except:", "except ", "finally:")):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing import Any, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
@@ -9,7 +9,7 @@ class dtype:
|
||||
int64: dtype
|
||||
bool: dtype
|
||||
|
||||
class ndarray(Generic[T]):
|
||||
class ndarray[T]:
|
||||
dtype: dtype
|
||||
shape: tuple[int, ...]
|
||||
ndim: int
|
||||
|
||||
Reference in New Issue
Block a user