fix: add InferenceResult, ModelOutput, ModelRepository, FileUploadResult to __all__#199
Open
amathxbt wants to merge 1 commit intoOpenGradient:mainfrom
Open
fix: add InferenceResult, ModelOutput, ModelRepository, FileUploadResult to __all__#199amathxbt wants to merge 1 commit intoOpenGradient:mainfrom
amathxbt wants to merge 1 commit intoOpenGradient:mainfrom
Conversation
…ult to __all__ These four types are imported at the top of __init__.py and are part of the public API surface, but were missing from __all__. This means 'from opengradient import *' silently omits them, breaking any user code that relies on wildcard imports. It also misleads static analysis tools and IDE auto-completion into thinking these types are not publicly exported.
Contributor
Author
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.
Bug
Four types are imported at the top level of
src/opengradient/__init__.pybut are missing from__all__:InferenceResultModelOutputModelRepositoryFileUploadResultImpact
from opengradient import *__all__-based docshasattr(og, "InferenceResult")True(they ARE importable) — inconsistent with__all__Note: Direct imports still work (
from opengradient import InferenceResult) — this is a__all__correctness fix.Fix
Add the four missing types to
__all__: