Repository navigation
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-11-02 23:49:35.620886079 +0000
+++ /tmp/pyrefly_pr.txt 2026-11-02 23:49:22.848735435 +0000
@@ -5734,24 +5734,6 @@
--> tests/unit_tests/libs/test_external_api.py:436:12
ERROR Cannot index into `str` [bad-index]
--> tests/unit_tests/libs/test_external_api.py:436:12
-ERROR Class member `User.get_id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/libs/test_flask_utils.py:18:9
-ERROR `str` is not assignable to dict key `error` with type `None` [bad-assignment]
- --> tests/unit_tests/libs/test_flask_utils.py:71:35
-ERROR `str` is not assignable to dict key `error` with type `None` [bad-assignment]
- --> tests/unit_tests/libs/test_flask_utils.py:114:35
-ERROR Object of class `Flask` has no attribute `_get_current_object` [missing-attribute]
- --> tests/unit_tests/libs/test_flask_utils.py:131:18
-ERROR Argument `None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/unit_tests/libs/test_helper.py:159:30
-ERROR Argument `Literal['not_a_user_object']` is not assignable to parameter `user` with type `Account | EndUser` in function `libs.helper.extract_tenant_id` [bad-argument-type]
- --> tests/unit_tests/libs/test_helper.py:169:31
-ERROR Argument `None` is not assignable to parameter `user` with type `Account | EndUser` in function `libs.helper.extract_tenant_id` [bad-argument-type]
- --> tests/unit_tests/libs/test_helper.py:174:31
-ERROR Argument `dict[str, str]` is not assignable to parameter `user` with type `Account | EndUser` in function `libs.helper.extract_tenant_id` [bad-argument-type]
- --> tests/unit_tests/libs/test_helper.py:181:31
-ERROR Argument `None` is not assignable to parameter `pattern` with type `str` in function `libs.helper.escape_like_pattern` [bad-argument-type]
- --> tests/unit_tests/libs/test_helper.py:228:38
ERROR Class member `TestCronCompatibility.setUp` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/libs/test_schedule_utils.py:22:9
ERROR Class member `TestTimezoneCompatibility.setUp` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44882 +/- ##
==========================================
- Coverage 89.77% 89.77% -0.01%
==========================================
Files 6239 6237 -2
Lines 390924 390745 -179
Branches 79291 79213 -78
==========================================
- Hits 350955 350790 -165
+ Misses 33869 33856 -13
+ Partials 6100 6099 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
asukaminato0721
previously approved these changes
Oct 28, 2026
asukaminato0721
enabled auto-merge
October 28, 2026 08:04
auto-merge was automatically disabled
November 2, 2026 23:38
Head branch was pushed to by a user without write access
- test_login.py: use mocker.patch.object instead of direct method assignment (mypy method-assign) - test_email_i18n.py: add missing -> None return annotation (ruff ANN201)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable strict pyrefly checking for 7 test files under
tests/unit_tests/libs/by removing them from the strict-mode exclusion list and fixing the resulting diagnostics:Callable[..., None]forconfig_overrides,Callable[..., Response | str]for the login-protected view,Callable[[MockUser | Account | None], MagicMock]for the user resolver,dict[str, object]for thread-result dicts).-> None/-> datetime/-> Response | strreturns; addGenerator[...]for yielding fixtures.@overrideto theUserMixin.get_idtest double (pattern already used inclients/agent_backend/test_client.py).extract_tenant_id(None),escape_like_pattern(None), ...), the werkzeug proxy_get_current_objectaccess, and a dynamically assignedtenant_idon anEndUser— matching the# pyrefly: ignore[...]usage already present in the suite.Verification
pyrefly checkwith the unit-test strict config: 0 diagnostics for all 7 files.ruff format+ruff check: clean.scripts/check_no_new_test_doubles.py --base-rev main: no new test doubles.libs/test files importtests/unit_tests/controllers/conftest, whose chain cannot be collected in this local Windows sandbox (hangs on import, same asevents/andtasks/), so runtime coverage relies on CI.