Skip to content

test(api): enable strict pagination test types - #43432

Open
kr1shna-exe wants to merge 2 commits into
langgenius:mainfrom
kr1shna-exe:test/36288-pagination-strict-types
Open

kr1shna-exe wants to merge 2 commits into
langgenius:mainfrom
kr1shna-exe:test/36288-pagination-strict-types

Conversation

@kr1shna-exe

Copy link
Copy Markdown
Contributor

Summary

Related to #36288.

The pagination unit tests are excluded from strict Pyrefly checking and produce 24 diagnostics when checked directly. This enables strict checking for that file.

What changed

  • Annotate test returns and integer parameters.
  • Specify PaginatedResult[object] for empty containers.
  • Remove libs/test_pagination.py from the strict-check exclusions.

Existing test inputs and assertions are unchanged. This covers one file in the broader issue.

Verification

  • uv run --project api pyrefly check api/tests/unit_tests/libs/test_pagination.py: 24 diagnostics before; 0 after.
  • make test TARGET_TESTS=./api/tests/unit_tests/libs/test_pagination.py: 24 passed.
  • make lint && make type-check: passed.
  • git diff --check: passed.

Screenshots

Not applicable: test annotations and type-check configuration only.

Checklist

  • Linked the existing issue.
  • Ran the affected tests and backend lint/type checks.
  • No documentation update is needed for this test-only change.

@ghfind-review ghfind-review Bot added the review: low ghfind author score; see https://ghfind.com label Oct 2, 2026
@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 69.87% 69.89% +0.03%
Strict coverage 69.52% 69.55% +0.03%
Typed symbols 55,591 55,612 +21
Untyped symbols 24,094 24,073 -21
Modules 3703 3703 0

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (34c9438) to head (9405a56).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #43432   +/-   ##
=======================================
  Coverage   89.82%   89.82%           
=======================================
  Files        6244     6244           
  Lines      397256   397256           
  Branches    80000    80000           
=======================================
  Hits       356849   356849           
  Misses      34111    34111           
  Partials     6296     6296           
Flag Coverage Δ
api 89.67% <ø> (-0.01%) ⬇️

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

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asukaminato0721 asukaminato0721 self-assigned this Oct 30, 2026
@github-actions github-actions Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: low ghfind author score; see https://ghfind.com size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants