Conversation
…from __init__.py
`import *` does not re-export names starting with `_`, so the private
competitor-enrichment helpers added in endpoints.py were invisible when
imported from the package:
from litellm.proxy.management_endpoints.policy_endpoints import (
_build_all_names_per_competitor, ...
)
This caused an ImportError that prevented the entire test module from
collecting. Add explicit imports for each private helper so they are
accessible from the package namespace.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryFixes import error in
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| litellm/proxy/management_endpoints/policy_endpoints/init.py | Explicitly re-exports 8 private helper functions to fix test imports - straightforward fix |
Last reviewed commit: 65388d8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_policy_endpoints.pywas failing at collection with:import *does not re-export names beginning with_. The__init__.pyonly usedfrom .endpoints import *, so the 8 private competitor-enrichment helper functions were invisible at the package level.Not related to PR #21664 (pricing JSON changes).
Test plan
pytest tests/test_litellm/proxy/management_endpoints/test_policy_endpoints.py --collect-onlynow collects 43 tests (previously import error)🤖 Generated with Claude Code