refactor(api): fix pyright errors in jieba, milvus, couchbase, oracle, and router#34938
Open
tmimmanuel wants to merge 4 commits intolanggenius:mainfrom
Open
refactor(api): fix pyright errors in jieba, milvus, couchbase, oracle, and router#34938tmimmanuel wants to merge 4 commits intolanggenius:mainfrom
tmimmanuel wants to merge 4 commits intolanggenius:mainfrom
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 17:50:48.240180829 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 17:50:39.811213395 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._create_namespace_request.CreateNamespaceRequest.__init__` [bad-argument-type]
--> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:120:40
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._describe_collection_request.DescribeCollectionRequest.__init__` [bad-argument-type]
@@ -158,10 +150,6 @@
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:398:33
ERROR `None` is not subscriptable [unsupported-operation]
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:401:30
-ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:96:50
-ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:114:34
ERROR Argument `Literal['HNSW']` is not assignable to parameter `index_type` with type `VecIndexType` in function `pyobvector.client.index_param.IndexParams.add_index` [bad-argument-type]
--> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:160:28
ERROR Class member `OceanBaseVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -170,10 +158,8 @@
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:110:9
ERROR `dict[str, dict[Field | str, list[float] | Any]]` is not assignable to TypedDict key with type `dict[Field, dict[Field | str, list[float] | Any]]` [bad-typed-dict-key]
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:204:33
-ERROR No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, str | None]) [no-matching-overload]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:139:31
ERROR Function declared to return `bool`, but one or more paths are missing an explicit `return` [bad-return]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:191:39
+ --> core/rag/datasource/vdb/oracle/oraclevector.py:187:39
ERROR No matching overload found for function `sqlalchemy.sql.sqltypes.UUID.__init__` called with arguments: (as_uuid=Literal[True]) [no-matching-overload]
--> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:66:32
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.describe_collection` [bad-argument-type]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 18:08:21.819179476 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 18:08:12.381237744 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._create_namespace_request.CreateNamespaceRequest.__init__` [bad-argument-type]
--> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:120:40
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._describe_collection_request.DescribeCollectionRequest.__init__` [bad-argument-type]
@@ -158,10 +150,6 @@
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:398:33
ERROR `None` is not subscriptable [unsupported-operation]
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:401:30
-ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:96:50
-ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:114:34
ERROR Argument `Literal['HNSW']` is not assignable to parameter `index_type` with type `VecIndexType` in function `pyobvector.client.index_param.IndexParams.add_index` [bad-argument-type]
--> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:160:28
ERROR Class member `OceanBaseVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -170,10 +158,8 @@
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:110:9
ERROR `dict[str, dict[Field | str, list[float] | Any]]` is not assignable to TypedDict key with type `dict[Field, dict[Field | str, list[float] | Any]]` [bad-typed-dict-key]
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:204:33
-ERROR No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, str | None]) [no-matching-overload]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:139:31
ERROR Function declared to return `bool`, but one or more paths are missing an explicit `return` [bad-return]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:191:39
+ --> core/rag/datasource/vdb/oracle/oraclevector.py:187:39
ERROR No matching overload found for function `sqlalchemy.sql.sqltypes.UUID.__init__` called with arguments: (as_uuid=Literal[True]) [no-matching-overload]
--> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:66:32
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.describe_collection` [bad-argument-type]
|
3aba995 to
1c5b97d
Compare
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-11 15:58:44.512731923 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-11 15:58:36.592546634 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._create_namespace_request.CreateNamespaceRequest.__init__` [bad-argument-type]
--> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:120:40
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._describe_collection_request.DescribeCollectionRequest.__init__` [bad-argument-type]
@@ -158,10 +150,6 @@
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:398:33
ERROR `None` is not subscriptable [unsupported-operation]
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:401:30
-ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:96:50
-ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:114:34
ERROR Argument `Literal['HNSW']` is not assignable to parameter `index_type` with type `VecIndexType` in function `pyobvector.client.index_param.IndexParams.add_index` [bad-argument-type]
--> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:160:28
ERROR Class member `OceanBaseVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -170,10 +158,8 @@
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:110:9
ERROR `dict[str, dict[Field | str, list[float] | Any]]` is not assignable to TypedDict key with type `dict[Field, dict[Field | str, list[float] | Any]]` [bad-typed-dict-key]
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:204:33
-ERROR No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, str | None]) [no-matching-overload]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:139:31
ERROR Function declared to return `bool`, but one or more paths are missing an explicit `return` [bad-return]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:191:39
+ --> core/rag/datasource/vdb/oracle/oraclevector.py:199:39
ERROR No matching overload found for function `sqlalchemy.sql.sqltypes.UUID.__init__` called with arguments: (as_uuid=Literal[True]) [no-matching-overload]
--> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:66:32
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.describe_collection` [bad-argument-type]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-13 03:06:43.039355202 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-13 03:06:34.573440896 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._create_namespace_request.CreateNamespaceRequest.__init__` [bad-argument-type]
--> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:120:40
ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._describe_collection_request.DescribeCollectionRequest.__init__` [bad-argument-type]
@@ -158,10 +150,6 @@
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:398:33
ERROR `None` is not subscriptable [unsupported-operation]
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:401:30
-ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:96:50
-ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:114:34
ERROR Argument `Literal['HNSW']` is not assignable to parameter `index_type` with type `VecIndexType` in function `pyobvector.client.index_param.IndexParams.add_index` [bad-argument-type]
--> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:160:28
ERROR Class member `OceanBaseVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -170,10 +158,8 @@
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:110:9
ERROR `dict[str, dict[Field | str, list[float] | Any]]` is not assignable to TypedDict key with type `dict[Field, dict[Field | str, list[float] | Any]]` [bad-typed-dict-key]
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:204:33
-ERROR No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, str | None]) [no-matching-overload]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:139:31
ERROR Function declared to return `bool`, but one or more paths are missing an explicit `return` [bad-return]
- --> core/rag/datasource/vdb/oracle/oraclevector.py:191:39
+ --> core/rag/datasource/vdb/oracle/oraclevector.py:199:39
ERROR No matching overload found for function `sqlalchemy.sql.sqltypes.UUID.__init__` called with arguments: (as_uuid=Literal[True]) [no-matching-overload]
--> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:66:32
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.describe_collection` [bad-argument-type]
|
Contributor
Author
|
Hi, @asukaminato0721 |
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-14 05:17:55.472870770 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-14 05:17:44.825842576 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR `upload_file` may be uninitialized [unbound-name]
--> core/rag/extractor/extract_processor.py:116:61
ERROR `upload_file` may be uninitialized [unbound-name]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-14 16:01:57.073380223 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-14 16:01:46.370367124 +0000
@@ -70,14 +70,6 @@
--> core/ops/mlflow_trace/mlflow_trace.py:415:24
ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
--> core/ops/ops_trace_manager.py:206:9
-ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
-ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
-ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
ERROR `upload_file` may be uninitialized [unbound-name]
--> core/rag/extractor/extract_processor.py:116:61
ERROR `upload_file` may be uninitialized [unbound-name]
|
Contributor
Author
|
Hi, @asukaminato0721 @crazywoola |
This was referenced Apr 14, 2026
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
dataset_keyword_tablein jieba keyword handlercut()return and provide default forNonetopKinvoke_llmoverload mismatch in multi-dataset function call routerpool_paramsdict type in oracle vector to acceptNonevaluesdescribe_collectionandget_server_versionreturns in milvus vectorTest plan
make type-check-corepasses with 0 errorsPart of #26412