Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconsider your definition of private and public interface please #882

Closed
pafi-code opened this issue Feb 16, 2024 · 6 comments · Fixed by #895
Closed

Reconsider your definition of private and public interface please #882

pafi-code opened this issue Feb 16, 2024 · 6 comments · Fixed by #895

Comments

@pafi-code
Copy link

When trying to use this client in your own code with type hints, you are facing the challenge of adding typehints for specific return objects. For example collection.query.fetch_objects() has a private return type of QueryReturn which only exists in weaviate.collections.classes.internals. So you are exposing your private interface via your public interface, which doesn't make sense.

Hope it's understandable.

Cheers 🍺

@pafi-code pafi-code changed the title Reconsider your definition of private and public API please Reconsider your definition of private and public interface please Feb 16, 2024
@dirkkul
Copy link
Collaborator

dirkkul commented Feb 16, 2024

H, all types should be available as TypeAlias in weaviate/outputs and its subfolders - QueryReturnType is available as weaviate.outputs.query.QueryReturnType. Does that help?

@pafi-code
Copy link
Author

Well at least to some degree. But this doesn't really solve everything. For example I can't really find a public type for object from collection.query.fetch_objects().objects.

@tsmith023
Copy link
Collaborator

Ah, this one is missing from the outputs module, as are some others on reflection. We'll add them to it in the next patch!

@pafi-code
Copy link
Author

Okay thanks for clarification. I didn't know about the outputs subpackage for public interface. Thanks a lot and looking forward! :)

@pafi-code
Copy link
Author

@dirkkul When will this be released ? 👉👈

@dirkkul
Copy link
Collaborator

dirkkul commented Feb 21, 2024

End of this week probably

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 a pull request may close this issue.

3 participants