You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
I have searched for existing issues, including closed ones.
I confirm that I am using English to submit this report, otherwise it will be closed.
【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
Please do not modify this template :) and fill in all the required fields.
Description
Continuing #24645: api/tests/unit_tests/core/rag/datasource/keyword/jieba/test_jieba_keyword_table_handler.py is still listed in the project-excludes of api/tests/unit_tests/pyrefly.toml, so strict Pyrefly never checks it.
Running strict Pyrefly on the file (pyrefly 1.4.0) reports 19 diagnostics, all in the test's own declarations:
10 unannotated-return: the eight test functions, _DummyTFIDF.__init__ and _install_fake_jieba_modules have no return annotation.
2 implicit-any-parameter: _install_fake_jieba_modules takes an unannotated monkeypatch, and _DummyTFIDF.extract_tags takes unannotated **kwargs.
7 missing-attribute: the tests install a fake jieba.analyse module and assign default_tfidf / TFIDF / analyse on a plain types.ModuleType, which declares none of them.
Nothing here is a behavior defect; the file is simply not under strict checking yet.
The module is brought under strict Pyrefly checking and removed from the exclusion list, following the pattern used by #43883, #43875 and #43798.
Actual Behavior
As described above.
Additional Context
I have a patch ready that annotates the declarations and documents the seven intentional fake-module attribute assignments with # pyrefly: ignore[missing-attribute], changes no assertion and no test logic, and removes the single exclusion entry. I will open a PR referencing this issue.
I can prepare a focused patch that removes the test file from the Pyrefly project exclusions, adds the missing annotations, and declares the attributes used by the fake jieba modules. I'll run strict Pyrefly and the focused Jieba test module to verify the change.
Please assign the issue to @Luckyou-d if it is still available.
Activity
Luckyou-d commentedon Nov 3, 2026
Hi! I'd like to take this issue.
I can prepare a focused patch that removes the test file from the Pyrefly project exclusions, adds the missing annotations, and declares the attributes used by the fake jieba modules. I'll run strict Pyrefly and the focused Jieba test module to verify the change.
Please assign the issue to @Luckyou-d if it is still available.