fix(format): reformat api_naming_conventions_steps.py with ruff
CI / lint (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 54s
CI / helm (pull_request) Successful in 46s
CI / build (pull_request) Successful in 54s
CI / push-validation (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 1m11s
CI / security (pull_request) Successful in 1m18s
CI / unit_tests (pull_request) Successful in 8m51s
CI / docker (pull_request) Successful in 2m9s
CI / integration_tests (pull_request) Successful in 17m47s
CI / coverage (pull_request) Failing after 12m32s
CI / status-check (pull_request) Has been cancelled

This commit is contained in:
2026-06-04 19:51:04 -04:00
committed by drew
parent 4b180e9429
commit fe0f2f45ae
+8 -24
View File
@@ -15,9 +15,7 @@ def step_project_service_available(context):
# Verify the service module exists and has the expected methods
import importlib.util
spec = importlib.util.find_spec(
"cleveragents.application.services.project_service"
)
spec = importlib.util.find_spec("cleveragents.application.services.project_service")
assert spec is not None, "ProjectService module not found"
context.project_service_available = True
context.project_service_module = "cleveragents.application.services.project_service"
@@ -28,9 +26,7 @@ def step_plan_service_available(context):
"""Make plan service available."""
import importlib.util
spec = importlib.util.find_spec(
"cleveragents.application.services.plan_service"
)
spec = importlib.util.find_spec("cleveragents.application.services.plan_service")
assert spec is not None, "PlanService module not found"
context.plan_service_available = True
context.plan_service_module = "cleveragents.application.services.plan_service"
@@ -47,9 +43,7 @@ def step_create_project(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "create_project" in method_names, (
"ProjectService should have create_project method"
@@ -105,9 +99,7 @@ def step_retrieve_plan_by_name(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "get_plan_by_name" in method_names or "switch_to_plan" in method_names, (
"PlanService should have get_plan_by_name or switch_to_plan method"
@@ -150,9 +142,7 @@ def step_list_projects(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "list_projects" in method_names, (
"ProjectService should have list_projects method"
@@ -171,9 +161,7 @@ def step_list_plans(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "list_plans" in method_names, "PlanService should have list_plans method"
context.list_plans_exists = True
@@ -204,9 +192,7 @@ def step_get_current_project(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "get_current_project" in method_names, (
"ProjectService should have get_current_project method"
@@ -225,9 +211,7 @@ def step_get_current_plan(context):
with open(spec.origin) as f:
tree = ast.parse(f.read())
method_names = [
node.name
for node in ast.walk(tree)
if isinstance(node, ast.FunctionDef)
node.name for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)
]
assert "get_current_plan" in method_names, (
"PlanService should have get_current_plan method"