-
Notifications
You must be signed in to change notification settings - Fork 21.1k
[Refactor/Chore] ERROR Class member OpenGauss.add_texts overrides parent class BaseVector in an inconsistent manner [bad-override] #32511
Copy link
Copy link
Closed
Labels
good first issueGood first issue for newcomersGood first issue for newcomers🐞 bugSomething isn't workingSomething isn't working🙏 help wantedExtra attention is neededExtra attention is needed
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Description
ERROR Class member `OpenGauss.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/opengauss/opengauss.py:128:9
|
128 | def add_texts(self, documents: list[Document], embeddings: list[list[float]], **kwargs):
| ^^^^^^^^^
|
`OpenGauss.add_texts` has type `(self: OpenGauss, documents: list[Document], embeddings: list[list[float]], **kwargs: Unknown) -> list[Any]`, which is not assignable to `(self: OpenGauss, documents: list[Document], embeddings: list[list[float]], **kwargs: Unknown) -> Never`, the type of `BaseVector.add_texts`
Signature mismatch:
expected: def add_texts(self: OpenGauss, documents: list[Document], embeddings: list[list[float]], **kwargs: Unknown) -> Never: ...
^^^^^ return type
found: def add_texts(self: OpenGauss, documents: list[Document], embeddings: list[list[float]], **kwargs: Unknown) -> list[Any]: ...
^^^^^^^^^ return type
ERROR Class member `OpenGauss.delete_by_ids` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/opengauss/opengauss.py:162:9
|
162 | def delete_by_ids(self, ids: list[str]):
| ^^^^^^^^^^^^^
|
`OpenGauss.delete_by_ids` has type `(self: OpenGauss, ids: list[str]) -> None`, which is not assignable to `(self: OpenGauss, ids: list[str]) -> Never`, the type of `BaseVector.delete_by_ids`
Signature mismatch:
expected: def delete_by_ids(self: OpenGauss, ids: list[str]) -> Never: ...
^^^^ return type
found: def delete_by_ids(self: OpenGauss, ids: list[str]) -> None: ...
^^^ return type
ERROR Class member `OpenGauss.delete_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/opengauss/opengauss.py:171:9
|
171 | def delete_by_metadata_field(self, key: str, value: str):
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
`OpenGauss.delete_by_metadata_field` has type `(self: OpenGauss, key: str, value: str) -> None`, which is not assignable to `(self: OpenGauss, key: str, value: str) -> Never`, the type of `BaseVector.delete_by_metadata_field`
Signature mismatch:
expected: def delete_by_metadata_field(self: OpenGauss, key: str, value: str) -> Never: ...
^^^^ return type
found: def delete_by_metadata_field(self: OpenGauss, key: str, value: str) -> None: ...
^^^ return type
ERROR Class member `OpenGauss.delete` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/opengauss/opengauss.py:225:9
|
225 | def delete(self):
| ^^^^^^
|
`OpenGauss.delete` has type `(self: OpenGauss) -> None`, which is not assignable to `(self: OpenGauss) -> Never`, the type of `BaseVector.delete`
Signature mismatch:
expected: def delete(self: OpenGauss) -> Never: ...
^^^^ return type
found: def delete(self: OpenGauss) -> None: ...
^^^ return type
Motivation
No response
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood first issue for newcomersGood first issue for newcomers🐞 bugSomething isn't workingSomething isn't working🙏 help wantedExtra attention is neededExtra attention is needed