Repository navigation
refactor(api): enable strict typing for workspace permission tests - #43875
Merged
asukaminato0721 merged 1 commit intoOct 11, 2026
Conversation
asukaminato0721
enabled auto-merge
October 11, 2026 10:31
asukaminato0721
approved these changes
Oct 11, 2026
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #43875 +/- ##
=======================================
Coverage 88.81% 88.82%
=======================================
Files 5319 5319
Lines 329278 329278
Branches 65994 65994
=======================================
+ Hits 292454 292466 +12
+ Misses 31596 31583 -13
- Partials 5228 5229 +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:
|
fatelei
pushed a commit
to fatelei/dify
that referenced
this pull request
Oct 13, 2026
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #24645, following #43798 / #43840.
libs/test_workspace_permission.py(tests for the workspace member-invite and owner-transfer permission helpers) was excluded from strict Pyrefly checks as strict-mode debt, and reported 23 strict diagnostics — 8 unannotated returns and 15 implicit-any parameters. This brings the file under strict checking so future typing regressions are caught.This covers this one test file only. No production code changes, and no test logic or assertions change.
What changed
@patch-injectedmock_enterprise_serviceparameters asMock.config_overridesparameters asCallable[..., None], the type the roottests/unit_tests/conftest.pyfixture returns (same as refactor(api): enable strict typing for cached embedding tests #43798).-> Nonereturn annotations to the eight test methods.Verification
pyrefly check --config=tests/unit_tests/pyrefly.toml --use-ignore-files=false --disable-project-excludes-heuristics=true tests/unit_tests/libs/test_workspace_permission.py(fromapi/): 23 diagnostics before the change, zero after.pyrefly check --config=tests/unit_tests/pyrefly.tomlover the whole unit-test project: passed../dev/pyrefly-check-local(backendmake type-check): passed.uv run --dev pytest tests/unit_tests/libs/test_workspace_permission.py: 8 passed.ruff formatandruff checkon the file: passed.lint-imports: 64 contracts kept, 0 broken.scripts/check_no_spec_mock.pyon the file: passed.scripts/check_no_new_getattr.py,check_no_new_controller_sqlalchemy.py,check_no_new_session_mock.pywith--base-rev origin/main: passed.Screenshots
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods (backend only: ran the underlying ruff, import-linter, guard-script and Pyrefly commands listed above)From OpenCode