feat: export private collection config types as public aliases#2049
Open
LijuanTang94 wants to merge 1 commit into
Open
feat: export private collection config types as public aliases#2049LijuanTang94 wants to merge 1 commit into
LijuanTang94 wants to merge 1 commit into
Conversation
Users annotating parameters like `generative_config`, `reranker_config`, `vector_index_config`, etc. had to import private `_`-prefixed types, which pyright strict mode (`reportPrivateUsage: error`) flags as an error. Adds public TypeAlias entries for the 8 affected types, following the same pattern as `FilterReturn` introduced in weaviate#1993: - GenerativeConfigCreate (_GenerativeProvider) - InvertedIndexConfigCreate (_InvertedIndexConfigCreate) - MultiTenancyConfigCreate (_MultiTenancyConfigCreate) - ObjectTTLConfigCreate (_ObjectTTLConfigCreate) - ReplicationConfigCreate (_ReplicationConfigCreate) - RerankerConfigCreate (_RerankerProvider) - ShardingConfigCreate (_ShardingConfigCreate) - VectorIndexConfigCreate (_VectorIndexConfigCreate) All 8 aliases are exported from `weaviate.classes.config`. Closes weaviate#1994
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
Author
|
I have read the CLA Document and I hereby agree to the terms of the CLA.
获取 Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
发件人: Weaviate Git Bot ***@***.***>
发送时间: Sunday, May 31, 2026 4:00:57 PM
收件人: weaviate/weaviate-python-client ***@***.***>
抄送: Lijuan Tang ***@***.***>; Author ***@***.***>
主题: Re: [weaviate/weaviate-python-client] feat: export private collection config types as public aliases (PR #2049)
[https://avatars.githubusercontent.com/u/83967968?s=20&v=4]weaviate-git-bot left a comment (weaviate/weaviate-python-client#2049)<#2049 (comment)>
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement<https://weaviate.io/service/contributor-license-agreement>. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.
beep boop - the Weaviate bot 👋🤖
PS:
Are you already a member of the Weaviate Forum?<https://forum.weaviate.io/>
—
Reply to this email directly, view it on GitHub<#2049?email_source=notifications&email_token=BEY3V5DIET2K5L7LK2ZDMND45S2STA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJYHA2DQOJQGY4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4588489068>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BEY3V5BCA3UIY4CJ6LONK7T45S2STAVCNFSM6AAAAACZUXSTYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKOBYGQ4DSMBWHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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
Closes #1994
Users who want to type-annotate parameters like
generative_config,reranker_config,vector_index_config, etc. incollection.create()currently have to import private_-prefixed types. In pyright strict mode (reportPrivateUsage: error) this is flagged as an error.This PR follows the exact same pattern as #1993 (
FilterReturn) and adds publicTypeAliasentries for the 8 affected types fromcollections/collections/executor.py:GenerativeConfigCreate_GenerativeProviderInvertedIndexConfigCreate_InvertedIndexConfigCreateMultiTenancyConfigCreate_MultiTenancyConfigCreateObjectTTLConfigCreate_ObjectTTLConfigCreateReplicationConfigCreate_ReplicationConfigCreateRerankerConfigCreate_RerankerProviderShardingConfigCreate_ShardingConfigCreateVectorIndexConfigCreate_VectorIndexConfigCreateAll 8 aliases are re-exported from
weaviate.classes.config.Before
After
Changes
weaviate/collections/classes/config.py— 6 newTypeAliasentriesweaviate/collections/classes/config_object_ttl.py— addTypeAliasimport + 1 aliasweaviate/collections/classes/config_vector_index.py— addTypeAliasimport + 1 aliasweaviate/classes/config.py— import and re-export all 8 aliases in__all__