Skip to content

Commit 1b928ae

Browse files
GeneAIclaude
authored andcommitted
fix: Resolve import conflict between workflows.py and workflows/ package
Python was importing workflows.py instead of workflows/ package because .py files take precedence over packages with the same name. - Rename workflows.py → workflow_commands.py - Update workflows/__init__.py to import from workflow_commands.py - Fixes: ImportError: cannot import name 'WorkflowConfig' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent dd818a7 commit 1b928ae

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/empathy_os/workflows/__init__.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,9 @@
5858
from .step_config import WorkflowStepConfig, steps_from_tier_map, validate_step_config
5959
from .test_gen import TestGenerationWorkflow
6060

61-
# Re-export CLI commands from the workflows.py module
62-
# This handles the package shadowing the .py file
61+
# Re-export CLI commands from workflow_commands.py
6362
_parent_dir = os.path.dirname(os.path.dirname(__file__))
64-
_workflows_module_path = os.path.join(_parent_dir, "empathy_os", "workflows.py")
65-
66-
# Try the parent-level path first
67-
if not os.path.exists(_workflows_module_path):
68-
_workflows_module_path = os.path.join(
69-
os.path.dirname(os.path.dirname(__file__)), "workflows.py"
70-
)
63+
_workflows_module_path = os.path.join(_parent_dir, "workflow_commands.py")
7164

7265
# Initialize to None for type checking
7366
cmd_morning = None
@@ -204,7 +197,7 @@ def list_workflows() -> list[dict]:
204197
"list_workflows",
205198
# Stats for dashboard
206199
"get_workflow_stats",
207-
# CLI commands (re-exported from workflows.py)
200+
# CLI commands (re-exported from workflow_commands.py)
208201
"cmd_morning",
209202
"cmd_ship",
210203
"cmd_fix_all",

0 commit comments

Comments
 (0)