Skip to content

Fix circular import in utils.py by importing from interface#217

Merged
homatthew merged 1 commit intoNetflix-Skunkworks:mainfrom
homatthew:mho/utils-import-fix
Jan 27, 2026
Merged

Fix circular import in utils.py by importing from interface#217
homatthew merged 1 commit intoNetflix-Skunkworks:mainfrom
homatthew:mho/utils-import-fix

Conversation

@homatthew
Copy link
Contributor

Summary

  • Import CapacityPlan directly from interface.py (the canonical source) instead of from models/__init__.py
  • Prevents potential circular imports when models/__init__.py is extended with additional imports

Why

This is a prerequisite for the CostAwareModel mixin PR, which will add more exports to models/__init__.py.

Test plan

  • Import test passes: python -c "from service_capacity_modeling.models.utils import reduce_by_family"
  • All pre-commit hooks pass (ruff, mypy, pylint)

🤖 Generated with Claude Code

Import CapacityPlan directly from interface.py (the canonical source)
instead of from models/__init__.py. This prevents potential circular
imports when models/__init__.py is extended.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@homatthew homatthew marked this pull request as ready for review January 27, 2026 23:10
@homatthew homatthew merged commit ed8f8e8 into Netflix-Skunkworks:main Jan 27, 2026
4 checks passed
@homatthew homatthew deleted the mho/utils-import-fix branch February 18, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments