Skip to content

refactor(api): tighten shared adapter typing contracts#33588

Open
BeautyyuYanli wants to merge 29 commits intomainfrom
yanli/pyrefly-fix-plan-v2
Open

refactor(api): tighten shared adapter typing contracts#33588
BeautyyuYanli wants to merge 29 commits intomainfrom
yanli/pyrefly-fix-plan-v2

Conversation

@BeautyyuYanli
Copy link
Copy Markdown
Contributor

@BeautyyuYanli BeautyyuYanli commented Mar 17, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

This PR is drafted by gpt-5.4(high) and I'm responsible for all the changes. I have reviewed the code and verified the behavior; if any breakage remains, please reach out and I will fix it.

Summary

Issue: N/A. This refactor tightens shared adapter typing contracts across auth, vector, extractor, and index-processor boundaries, and replaces unsafe auth payload casts with TypeAdapter validation. It also reorganizes deferred concrete adapter families at the end of pyrefly-local-excludes.txt, and fixes the concrete hologres/lindorm typing mismatches required to keep repo-wide checks green.

Follow-up fixes in this PR also:

  • preserve valid GitHub OAuth payloads with nullable name/email
  • accept richer Notion page_icon payloads
  • keep legacy website crawl mode values and URL-based PDF/DOCX extraction working
  • normalize string auth providers in ApiKeyAuthFactory
  • remove auth subclass type: ignore initializers and fix vector batch-count logging
  • remove resolved pyrefly excludes for auth adapters, pdf_extractor, word_extractor, and lindorm_vector

I added focused backend tests around auth validation, auth factory provider handling, extractor URL-ingestion behavior, and vector/document normalization paths.

Screenshots

Before After
N/A N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check for the backend changes.

Copilot AI review requested due to automatic review settings March 17, 2026 11:48
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:49:28.123537047 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:49:18.845578864 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refactoring and tightening the typing contracts within the Dify API, specifically across authentication, vector database interactions, data extraction, and index processing components. It introduces improved validation mechanisms, fixes typing inconsistencies, and enhances the overall robustness and maintainability of the codebase. Additionally, it includes new tests to validate the changes and ensure proper behavior.

Highlights

  • Typing Contracts: This PR tightens the Phase 2 shared adapter contracts across auth, vector, extractor, and index processor boundaries, enhancing type safety and code reliability.
  • Authentication Validation: Unsafe auth payload casts are replaced with TypeAdapter validation, ensuring data integrity and preventing potential runtime errors.
  • Typing Mismatches: The PR addresses and fixes concrete hologres and lindorm typing mismatches, maintaining repo-wide check consistency.
  • Deferred Implementations: Groups deferred concrete adapter families at the end of pyrefly-local-excludes.txt and adds minimal auth adapter suppressions where those concrete implementations are still intentionally deferred.
  • Focused Testing: Focused auth/vector tests are added, covering the new validation and document normalization behavior to ensure functionality and prevent regressions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • api/core/rag/datasource/vdb/hologres/hologres_vector.py
    • Modified return type of get_ids_by_metadata_field to return an empty list instead of None when no results are found.
  • api/core/rag/datasource/vdb/lindorm/lindorm_vector.py
    • Added a check to ensure 'routing_value' is valid when using UGC index, raising a ValueError if it's None.
  • api/core/rag/datasource/vdb/vector_base.py
    • Added type hints to the BaseVector class and its methods, improving code clarity and preventing potential type-related errors.
  • api/core/rag/extractor/entity/extract_setting.py
    • Updated type hints for datasource_type, notion_page_type and website_info to use Literal and AuthType, enforcing stricter type constraints.
  • api/core/rag/extractor/extract_processor.py
    • Refactored temporary file path generation and added type alias for extract processor output, improving code maintainability and readability.
  • api/core/rag/extractor/extractor_base.py
    • Added type hint to the extract method to return a list of Document objects.
  • api/core/rag/extractor/helpers.py
    • Added type hint to the read_and_detect method to return a list of FileEncoding objects.
  • api/core/rag/index_processor/index_processor.py
    • Added TypedDict for IndexAndCleanResult and updated type hints for improved type safety and clarity.
  • api/core/rag/index_processor/index_processor_base.py
    • Added a check for None metadata in _get_content_files and specified type for upload_file_id_list.
  • api/core/rag/index_processor/index_processor_factory.py
    • Updated init method to accept None and used match-case for index processor initialization.
  • api/core/rag/splitter/fixed_text_splitter.py
    • Added return type hint to from_encoder method.
  • api/core/rag/vector_factory.py
    • Introduced TypedDicts for configuration and payload structures, added document normalization, and updated type hints for improved type safety and clarity.
  • api/extensions/storage/base_storage.py
    • Added return type hints to methods, improving code clarity and preventing potential type-related errors.
  • api/pyrefly-local-excludes.txt
    • Reorganized the file to group deferred concrete adapter families at the end, improving readability and maintainability.
  • api/services/auth/api_key_auth_base.py
    • Introduced TypedDicts for API key authentication configuration and credentials, enhancing type safety and code clarity.
  • api/services/auth/api_key_auth_factory.py
    • Updated type hints and constructor to use AuthProvider and ApiKeyAuthCredentials, enforcing stricter type constraints.
  • api/services/auth/api_key_auth_service.py
    • Implemented TypeAdapter validation for API key authentication arguments and credentials, ensuring data integrity and preventing potential runtime errors.
  • api/services/auth/auth_type.py
    • Added AuthProvider type alias.
  • api/services/auth/firecrawl/firecrawl.py
    • Added type ignore to the super().init call.
  • api/services/auth/jina.py
    • Added type ignore to the super().init call.
  • api/services/auth/jina/jina.py
    • Added type ignore to the super().init call.
  • api/services/auth/watercrawl/watercrawl.py
    • Added type ignore to the super().init call.
  • api/tests/unit_tests/services/auth/test_api_key_auth_service.py
    • Updated mock calls and assertions to reflect changes in argument validation and encryption, ensuring test accuracy.
  • api/tests/unit_tests/services/vector_service.py
    • Added tests to verify document normalization for child and attachment documents.
Activity
  • The author, BeautyyuYanli, has self-reviewed the code generated by gpt-5.4(high) and verified the behavior, but acknowledges that breaks may still exist.
  • The PR includes tests for each change and aims to make single atomic changes.
  • The author ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to ensure code quality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:49:28.123537047 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:49:18.845578864 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:54:49.141308717 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:54:39.899259224 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:54:49.141308717 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:54:39.899259224 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors backend “Phase 2” adapter contracts by tightening type hints across auth/vector/extractor/index-processor boundaries and introducing Pydantic TypeAdapter validation for API-key auth payloads to avoid unsafe casts.

Changes:

  • Introduces typed payload validation for API key auth creation/retrieval and updates auth tests accordingly.
  • Tightens typing across RAG vector/extractor/index-processor components; adds document normalization for child/attachment documents in vector ingestion plus new unit tests.
  • Reorganizes pyrefly-local-excludes.txt and patches a couple of concrete vector/auth adapters to keep type checks green.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
api/tests/unit_tests/services/vector_service.py Adds focused tests ensuring vector ingestion normalizes ChildDocument/AttachmentDocument into Document.
api/tests/unit_tests/services/auth/test_api_key_auth_service.py Updates tests for new TypeAdapter-based validation and non-mutating encryption behavior.
api/services/auth/api_key_auth_service.py Adds TypedDict contracts and centralized Pydantic validation for auth payloads; avoids mutating caller input when encrypting.
api/services/auth/api_key_auth_base.py Defines typed credential/config contracts for API-key auth adapters.
api/services/auth/api_key_auth_factory.py Tightens factory signatures/return types for auth adapter selection.
api/services/auth/auth_type.py Introduces AuthProvider union type for provider identifiers.
api/services/auth/firecrawl/firecrawl.py Adds type-check suppression for now (deferred adapter typing).
api/services/auth/watercrawl/watercrawl.py Adds type-check suppression for now (deferred adapter typing).
api/services/auth/jina.py Adds type-check suppression for now (deferred adapter typing).
api/services/auth/jina/jina.py Adds type-check suppression for now (deferred adapter typing).
api/pyrefly-local-excludes.txt Regroups deferred adapter families to the end with section headers.
api/extensions/storage/base_storage.py Tightens interface return types for storage adapters.
api/core/rag/splitter/fixed_text_splitter.py Adds explicit return type for from_encoder to match generic TS.
api/core/rag/index_processor/index_processor_factory.py Refactors branching logic to match and tightens typing.
api/core/rag/index_processor/index_processor_base.py Small typing/defensive tweaks around splitter return and attachment extraction.
api/core/rag/index_processor/index_processor.py Tightens index_and_clean/preview signatures and introduces a TypedDict result.
api/core/rag/extractor/helpers.py Adds return type for encoding detection helper.
api/core/rag/extractor/extractor_base.py Tightens extractor interface to return list[Document].
api/core/rag/extractor/extract_processor.py Replaces unsafe temp filename generation with mkstemp helper; tightens types and provider enum usage.
api/core/rag/extractor/entity/extract_setting.py Tightens ExtractSetting schemas (enums/Literals) for provider/mode/datasource_type.
api/core/rag/datasource/vdb/vector_factory.py Tightens vector factory types and normalizes heterogeneous document inputs before vector writes.
api/core/rag/datasource/vdb/vector_base.py Tightens base vector interface typing (notably get_ids_by_metadata_field).
api/core/rag/datasource/vdb/lindorm/lindorm_vector.py Ensures routing is non-None when using UGC routing.
api/core/rag/datasource/vdb/hologres/hologres_vector.py Aligns get_ids_by_metadata_field to return an empty list instead of None.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/pyrefly-local-excludes.txt Outdated
Comment thread api/core/rag/datasource/vdb/vector_base.py Outdated
Comment thread api/services/auth/api_key_auth_service.py Outdated
Comment thread api/core/rag/index_processor/index_processor_base.py Outdated
Comment thread api/pyrefly-local-excludes.txt Outdated
Comment thread api/pyrefly-local-excludes.txt Outdated
Comment thread api/pyrefly-local-excludes.txt Outdated
Comment thread api/pyrefly-local-excludes.txt Outdated
Comment thread api/tests/unit_tests/services/auth/test_api_key_auth_service.py Outdated
Comment thread api/tests/unit_tests/services/auth/test_api_key_auth_service.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:56:37.262684781 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:56:28.386542727 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 11:56:37.262684781 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:56:28.386542727 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

Copilot AI review requested due to automatic review settings March 17, 2026 11:59
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:00:08.983279817 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:59:59.740257331 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:00:08.983279817 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 11:59:59.740257331 +0000
@@ -203,24 +203,26 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
+ERROR Class member `LindormVectorStore.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:153:9
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86: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:104:34
+ERROR Class member `MilvusVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/milvus/milvus_vector.py:153:9
 ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
    --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
 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]
@@ -231,12 +233,18 @@
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
 ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:95:9
+ERROR Class member `OpenSearchVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/opensearch/opensearch_vector.py:119: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:189: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
+ERROR Class member `PGVectoRS.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:135:9
+ERROR Class member `RelytVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/relyt/relyt_vector.py:154:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
    --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
 ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
@@ -376,6 +384,8 @@
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
 ERROR `None` is not subscriptable [unsupported-operation]
   --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
+ERROR Class member `TiDBVector.get_ids_by_metadata_field` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
+   --> core/rag/datasource/vdb/tidb_vector/tidb_vector.py:171:9
 ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
 ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -3994,6 +4004,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5503,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5857,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is an excellent and thorough refactoring effort focused on improving type safety across various components of the RAG and authentication systems. The changes introduce stricter typing using TypedDict, Literal, and pydantic.TypeAdapter, which significantly enhances code clarity, maintainability, and robustness. Key improvements include replacing unsafe dictionary access and manual validation with pydantic models, refactoring temporary file creation to use safer standard library functions, and fixing several potential None-related bugs. The updates to unit tests to cover these changes are also comprehensive. I've included one suggestion to further improve the extensibility of the authentication service. Overall, this is a high-quality contribution that strengthens the codebase.

Comment thread api/services/auth/api_key_auth_service.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the backend “shared adapter” boundaries (auth, vector DB, extractors, index processors, storage) to tighten typing contracts and replace unsafe payload handling with Pydantic TypeAdapter validation, alongside a few targeted runtime/typing fixes and new unit tests.

Changes:

  • Strengthen API-key auth payload typing/validation and avoid mutating caller payloads when persisting encrypted credentials.
  • Normalize vector input document variants (ChildDocument / AttachmentDocument) into Document before passing to vector backends; add focused unit tests.
  • Improve type hints/return types across storage/extractor/indexing components; reorganize pyrefly-local-excludes.txt.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
api/tests/unit_tests/services/vector_service.py Adds tests for document normalization in vector create paths.
api/tests/unit_tests/services/auth/test_api_key_auth_service.py Updates expectations for new validation behavior and non-mutating payload handling.
api/services/auth/watercrawl/watercrawl.py Adds type-check suppressions for deferred adapter typing.
api/services/auth/jina/jina.py Adds type-check suppressions for deferred adapter typing.
api/services/auth/jina.py Adds type-check suppressions for deferred adapter typing.
api/services/auth/firecrawl/firecrawl.py Adds type-check suppressions for deferred adapter typing.
api/services/auth/auth_type.py Introduces AuthProvider union type alias.
api/services/auth/api_key_auth_service.py Implements TypeAdapter validation + typed arg/credential structures; avoids mutating input payload.
api/services/auth/api_key_auth_factory.py Tightens factory typing for provider/credentials and return types.
api/services/auth/api_key_auth_base.py Defines typed credential/config contracts for API-key auth adapters.
api/pyrefly-local-excludes.txt Reorders/group excludes by adapter families with comments.
api/extensions/storage/base_storage.py Adds/strengthens return and parameter type hints for storage interface.
api/core/rag/splitter/fixed_text_splitter.py Fixes/clarifies from_encoder return type.
api/core/rag/index_processor/index_processor_factory.py Adds explicit __init__ -> None and simplifies selection via match.
api/core/rag/index_processor/index_processor_base.py Removes a type-ignore; adds minor typing guard/annotations in content-file extraction.
api/core/rag/index_processor/index_processor.py Tightens return type for index_and_clean and related typing.
api/core/rag/extractor/helpers.py Adds explicit return type for encoding detection helper.
api/core/rag/extractor/extractor_base.py Types extract() to return list[Document].
api/core/rag/extractor/extract_processor.py Refactors temp file creation; tightens datasource/provider typing.
api/core/rag/extractor/entity/extract_setting.py Restricts several fields via Literal/enums and uses DatasourceType.
api/core/rag/datasource/vdb/vector_factory.py Adds document normalization and tighter typing for vector creation paths.
api/core/rag/datasource/vdb/vector_base.py Tightens base vector interface typing.
api/core/rag/datasource/vdb/lindorm/lindorm_vector.py Adds a runtime guard around routing in UGC mode.
api/core/rag/datasource/vdb/hologres/hologres_vector.py Aligns get_ids_by_metadata_field to always return list[str].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/core/rag/extractor/extract_processor.py Outdated
Comment thread api/core/rag/extractor/extract_processor.py Outdated
Comment thread api/services/auth/api_key_auth_service.py Outdated
Comment thread api/core/rag/datasource/vdb/lindorm/lindorm_vector.py
Comment thread api/core/rag/extractor/extract_processor.py Outdated
Comment thread api/core/rag/extractor/extract_processor.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:08:23.922160928 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 12:08:14.512084126 +0000
@@ -203,20 +203,18 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -3994,6 +3992,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5491,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5845,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:08:23.922160928 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 12:08:14.512084126 +0000
@@ -203,20 +203,18 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -3994,6 +3992,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5491,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:131:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:136:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:188:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:273:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:289:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:297:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:385:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5845,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

Copilot AI review requested due to automatic review settings March 17, 2026 12:10
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:11:15.170503509 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 12:11:05.915649788 +0000
@@ -203,20 +203,18 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -3994,6 +3992,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5491,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:132:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:132:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:137:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:137:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:189:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:274:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:290:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:298:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5845,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-17 12:11:15.170503509 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-17 12:11:05.915649788 +0000
@@ -203,20 +203,18 @@
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
 ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
 ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:35
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:29
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:390:30
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:391:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
+   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:395:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -3994,6 +3992,8 @@
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5491,32 +5491,52 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:61:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:78:58
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:132:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:132:24
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:137:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:137:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:189:16
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:274:31
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:290:13
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:298:9
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:44
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
@@ -5825,7 +5845,7 @@
 ERROR `list[Document]` is not assignable to attribute `children` with type `list[ChildDocument] | None` [bad-assignment]
    --> tests/unit_tests/services/vector_service.py:785:35
 ERROR Argument `None` is not assignable to parameter `metadata` with type `Mapping[str, Any]` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/services/vector_service.py:1740:60
+    --> tests/unit_tests/services/vector_service.py:1802:60
 ERROR Cannot instantiate `BaseQueueDispatcher` because the following members are abstract: `get_queue_name`, `get_priority` [bad-instantiation]
   --> tests/unit_tests/services/workflow/test_queue_dispatcher.py:40:32
 ERROR Cannot instantiate `CFSPlanScheduler` because the following members are abstract: `can_schedule` [bad-instantiation]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:18:13.911500512 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:18:05.325380576 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:18:13.911500512 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:18:05.325380576 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

Copilot AI review requested due to automatic review settings March 18, 2026 17:38
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:39:56.709938252 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:39:47.365030426 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:39:56.709938252 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:39:47.365030426 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:41:55.601042059 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:41:46.729963841 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-18 17:41:55.601042059 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-18 17:41:46.729963841 +0000
@@ -201,22 +201,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -437,12 +421,6 @@
    --> core/rag/extractor/watercrawl/provider.py:116:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:116:16
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:371:13
-ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
-   --> core/rag/extractor/word_extractor.py:392:25
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:425:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -4023,19 +4001,23 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
 ERROR Method `extract` inherited from class `BaseExtractor` has no implementation and cannot be accessed via `super()` [missing-attribute]
  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:8:16
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -4043,19 +4025,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:240:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -5537,40 +5519,110 @@
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:295:31
 ERROR Argument `Literal['account']` is not assignable to parameter `value` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> tests/unit_tests/repositories/workflow_node_execution/test_sqlalchemy_repository.py:311:32
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:17:35
 ERROR Cannot instantiate `ApiKeyAuthBase` because the following members are abstract: `validate_credentials` [bad-instantiation]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:27
-ERROR Argument `None` is not assignable to parameter `credentials` with type `dict[Unknown, Unknown]` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:25:28
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:33:35
+ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
+ERROR Argument `None` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:64:58
+ERROR Missing required key `auth_type` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Missing required key `config` for TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:57
+ERROR Key `api_key` is not defined in TypedDict `ApiKeyAuthCredentials` [bad-typed-dict-key]
+  --> tests/unit_tests/services/auth/test_api_key_auth_factory.py:81:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.api_key_auth_factory.ApiKeyAuthFactory.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:93:57
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]
   --> tests/unit_tests/services/auth/test_auth_type.py:82:34
+ERROR Argument `dict[str, dict[Unknown, Unknown] | str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:28:22
+ERROR Argument `dict[str, str]` is not assignable to parameter `credentials` with type `ApiKeyAuthCredentials` in function `services.auth.jina.jina.JinaAuth.__init__` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_jina_auth.py:35:22
 ERROR Could not import `MetadataValue` from `services.entities.knowledge_entities.knowledge_entities` [missing-module-attribute]
   --> tests/unit_tests/services/dataset_metadata.py:95:5
 ERROR Argument `Literal['']` is not assignable to parameter `plan` with type `CloudPlan` in function `DocumentIndexingTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 10:49:44.255270913 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 10:49:34.205994860 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 10:49:44.255270913 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 10:49:34.205994860 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

Copilot AI review requested due to automatic review settings March 25, 2026 10:50
@BeautyyuYanli BeautyyuYanli review requested due to automatic review settings March 25, 2026 10:50
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 10:51:36.532371569 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 10:51:25.066422538 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 10:51:36.532371569 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 10:51:25.066422538 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:92:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:116:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:141:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:143:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:146:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:199:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:239:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:247:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:255:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:263:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:279:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:284:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:300:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:303:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:308:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:311:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:330:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:349:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:370:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:386:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:396:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:54
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

Copilot AI review requested due to automatic review settings March 25, 2026 11:17
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 11:18:56.212832215 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 11:18:44.373911166 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:93:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:117:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:144:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:148:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:240:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:248:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:256:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:264:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:272:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:280:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:285:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:288:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:296:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:301:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:304:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:309:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:312:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:331:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:350:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:371:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:387:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:58
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 11:18:56.212832215 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 11:18:44.373911166 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5058,17 +5040,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5076,19 +5062,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6712,32 +6698,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:93:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:117:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:144:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:148:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:240:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:248:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:256:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:264:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:272:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:280:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:285:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:288:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:296:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:301:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:304:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:309:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:312:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:331:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:350:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:371:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:387:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:58
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 12:12:56.224642263 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 12:12:45.807699610 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5060,17 +5042,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5078,19 +5064,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6714,32 +6700,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:93:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:117:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:144:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:148:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:240:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:248:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:256:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:264:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:272:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:280:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:285:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:288:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:296:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:301:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:304:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:309:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:312:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:331:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:350:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:371:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:387:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:58
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-25 12:12:56.224642263 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-25 12:12:45.807699610 +0000
@@ -154,22 +154,6 @@
    --> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
 ERROR `tuple[str, str]` is not assignable to TypedDict key `basic_auth` with type `bool | int | list[str]` [bad-typed-dict-key]
   --> core/rag/datasource/vdb/huawei/huawei_cloud_vector.py:51:36
-ERROR Class member `LindormVectorStore.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
-  --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:84:9
-ERROR `str | None` is not assignable to TypedDict key `routing` with type `str` [bad-typed-dict-key]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:133:57
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:383:35
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:386:29
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:387:30
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:388:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:389:33
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
 ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
   --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
 ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
@@ -334,8 +318,6 @@
    --> core/rag/extractor/watercrawl/provider.py:141:16
 ERROR `None` is not subscriptable [unsupported-operation]
    --> core/rag/extractor/watercrawl/provider.py:141:16
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:426:24
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
@@ -5060,17 +5042,21 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:201:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:218:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:220:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:241:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:244:41
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:267:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:260:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:283:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:264:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:287:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:268:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:291:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `extract_setting` with type `ExtractSetting` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
-   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:272:38
+   --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:295:38
+ERROR Class member `_ConcreteExtractor.extract` overrides parent class `BaseExtractor` in an inconsistent manner [bad-override]
+  --> tests/unit_tests/core/rag/extractor/test_extractor_base.py:12:9
 ERROR Object of class `NoneType` has no attribute `strip` [missing-attribute]
   --> tests/unit_tests/core/rag/extractor/test_markdown_extractor.py:30:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `document_model` with type `Document | None` in function `core.rag.extractor.notion_extractor.NotionExtractor.update_last_edited_time` [bad-argument-type]
@@ -5078,19 +5064,19 @@
 ERROR Type `object` is not iterable [not-iterable]
   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:90:9
 ERROR `Any | None` is not assignable to attribute `FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:209:33
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:230:33
 ERROR `Any | None` is not assignable to attribute `INTERNAL_FILES_URL` with type `str` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:210:42
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:42
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:231:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:252:14
 ERROR `Literal[' HYPERLINK "http://example.com" ']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:284:22
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:305:22
 ERROR `Literal['Example']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:296:15
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:317:15
 ERROR `Literal['Dify']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:655:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:676:14
 ERROR `Literal['john@test.com']` is not assignable to attribute `text` with type `Ellipsis` [bad-assignment]
-   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:695:14
+   --> tests/unit_tests/core/rag/extractor/test_word_extractor.py:716:14
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor.retrieve` [bad-argument-type]
    --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:241:39
 ERROR Argument `Literal['semantic_search']` is not assignable to parameter `retrieval_method` with type `RetrievalMethod` in function `core.rag.index_processor.processor.parent_child_index_processor.ParentChildIndexProcessor.retrieve` [bad-argument-type]
@@ -6714,32 +6700,76 @@
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:42:35
 ERROR Argument `None` is not assignable to parameter `credentials` with type `AuthCredentials` in function `services.auth.api_key_auth_base.ApiKeyAuthBase.__init__` [bad-argument-type]
   --> tests/unit_tests/services/auth/test_api_key_auth_base.py:48:35
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:128:24
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:134:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:186:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_api_key_auth_service.py:93:64
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:117:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:142:24
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:144:64
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:147:16
+ERROR Cannot index into `str` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:148:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Cannot index into `object` [bad-index]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:200:16
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:240:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:248:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:256:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:264:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:272:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:280:58
 ERROR Cannot set item in `dict[str, dict[str, dict[str, str] | str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:271:31
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:285:31
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:288:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:296:58
 ERROR Cannot delete item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:287:13
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:301:13
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:304:58
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:295:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:309:9
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:312:58
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:331:54
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:350:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:371:68
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:387:68
 ERROR Cannot set item in `str` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:9
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:9
 ERROR Cannot set item in `dict[str, dict[str, str] | str]` [unsupported-operation]
-   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:383:44
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:397:44
+ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object] | None` in function `services.auth.api_key_auth_service.ApiKeyAuthService.validate_api_key_auth_args` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_api_key_auth_service.py:400:58
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+  --> tests/unit_tests/services/auth/test_auth_integration.py:39:66
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:116:74
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[KeyError], type[TypeError], type[AttributeError]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:142:27
 ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[HTTPError], type[Exception]]) [no-matching-overload]
    --> tests/unit_tests/services/auth/test_auth_integration.py:156:27
+ERROR Argument `dict[str, AuthType | dict[str, dict[str, str] | str] | str]` is not assignable to parameter `args` with type `dict[str, object]` in function `services.auth.api_key_auth_service.ApiKeyAuthService.create_provider_auth` [bad-argument-type]
+   --> tests/unit_tests/services/auth/test_auth_integration.py:170:70
 ERROR Class `AuthType` has no class attribute `INVALID_TYPE` [missing-attribute]
   --> tests/unit_tests/services/auth/test_auth_type.py:76:17
 ERROR `Literal['modified']` is not assignable to attribute `FIRECRAWL` with type `Literal[AuthType.FIRECRAWL]` [bad-assignment]

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 93.89313% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.54%. Comparing base (0e6d97a) to head (b485850).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
api/services/auth/api_key_auth_service.py 86.04% 3 Missing and 3 partials ⚠️
api/core/rag/extractor/extract_processor.py 93.10% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #33588      +/-   ##
==========================================
+ Coverage   80.53%   80.54%   +0.01%     
==========================================
  Files        4671     4672       +1     
  Lines      184988   185115     +127     
  Branches    36279    36292      +13     
==========================================
+ Hits       148981   149102     +121     
- Misses      32789    32792       +3     
- Partials     3218     3221       +3     
Flag Coverage Δ
api 79.03% <93.89%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants