Repository navigation
chore: example to color the session - #37402
Merged
asukaminato0721 merged 3 commits intoJun 15, 2026
Merged
Conversation
asukaminato0721
enabled auto-merge
June 13, 2026 02:22
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-06-13 02:26:43.933478735 +0000
+++ /tmp/pyrefly_pr.txt 2026-06-13 02:26:29.331410513 +0000
@@ -4411,6 +4411,16 @@
--> 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]
--> tests/unit_tests/core/rag/extractor/test_notion_extractor.py:435:43
+ERROR Missing argument `session` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor._extract_images_from_text` [missing-argument]
+ --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:538:70
+ERROR Missing argument `session` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor._extract_images_from_text` [missing-argument]
+ --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:545:65
+ERROR Missing argument `session` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor._extract_images_from_text` [missing-argument]
+ --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:572:70
+ERROR Missing argument `session` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor._extract_images_from_segment_attachments` [missing-argument]
+ --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:614:85
+ERROR Missing argument `session` in function `core.rag.index_processor.processor.paragraph_index_processor.ParagraphIndexProcessor._extract_images_from_segment_attachments` [missing-argument]
+ --> tests/unit_tests/core/rag/indexing/processor/test_paragraph_index_processor.py:626:91
ERROR Argument `None` is not assignable to parameter `state` with type `InstanceState[Any]` in function `sqlalchemy.orm.exc.ObjectDeletedError.__init__` [bad-argument-type]
--> tests/unit_tests/core/rag/indexing/test_indexing_runner.py:926:84
ERROR Argument `Literal['completed']` is not assignable to parameter `after_indexing_status` with type `IndexingStatus` in function `core.indexing_runner.IndexingRunner._update_document_index_status` [bad-argument-type]
|
Contributor
Pyrefly Type Coverage
|
3 of 5 tasks
WH-2099
approved these changes
Jun 15, 2026
5 tasks
This was referenced Jun 18, 2026
Closed
jashwanth-reddy-g
pushed a commit
to jashwanth-reddy-g/dify
that referenced
this pull request
Jun 24, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
jashwanth-reddy-g
pushed a commit
to jashwanth-reddy-g/dify
that referenced
this pull request
Jun 24, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
3 tasks done
This was referenced Jun 29, 2026
Ssazurov
pushed a commit
to Ssazurov/dify
that referenced
this pull request
Aug 8, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
4 tasks done
yuee3
added a commit
to yuee3/dify
that referenced
this pull request
Oct 10, 2026
… a local `ApiExternalDataTool.validate_config` and `query` reached for `db.session` inside the method body. The previous revision aliased that to a local variable, which documents the dependency no better: the signature still does not say the method reads the database, and neither does any call site. Both methods now take `session: Session | scoped_session` and query through it. `ExternalDataTool`'s two abstract methods declare the same parameter, and `ExternalDataToolFactory` — their only caller — passes `db.session`, so the dependency is visible at the call site. Same shape as the example in langgenius#37402 and as `get_message_data(message_id, session)` merged in langgenius#42753. `api.py` no longer imports `db`; `factory.py` imports it instead. Tests follow the signature: `test_api.py` drops the `_DatabaseBinding` monkeypatch that stood in for the module-level `db` and passes the real SQLite session, `test_factory.py` asserts `db.session` reaches the extension, and `test_base.py`'s concrete subclasses take the new parameter. Refs langgenius#37403
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
make session dep explicitly.
#37403
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods