Skip to content

(Claude) Pass the date window to the view tests as keyword arguments - #408

Merged
cboos merged 1 commit into
mainfrom
dev/date-window-ty
Nov 8, 2026
Merged

cboos merged 1 commit into
mainfrom
dev/date-window-ty

Conversation

@cboos

@cboos cboos commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

uv run ty check over the whole tree fails on main with 149 invalid-argument-type diagnostics, all in test/test_date_window_view.py (added by #403). The tests spread a shared WINDOW dict of the two dates into convert_jsonl_to and process_projects_hierarchy. ty infers it as dict[str, str] and checks it against every parameter, the boolean ones included. just ci runs ty and fails; GitHub CI runs pyright only, which accepts it, so the PR stayed green.

This replaces the dict with a DAY constant and passes from_date=DAY, to_date=DAY explicitly at each of the ten call sites. Test-only, no ignores, no behaviour change.

  • uv run ty check: all checks passed (149 before).
  • uv run pyright, ruff check, ruff format --check: clean.
  • test/test_date_window_view.py: 25 passed, as before.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated date-window test cases to provide start and end dates explicitly. The covered date range and expected results remain unchanged.
  • User Impact
    • No user-visible behavior changes.

The tests spread a dict of the two dates into convert_jsonl_to and
process_projects_hierarchy. A type checker infers that dict as
dict[str, str] and checks it against every parameter, the boolean ones
included, so `ty check` over the whole tree reported 149 errors in
this file. Naming from_date and to_date says the same thing and checks
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The date-window tests replace the shared WINDOW dictionary with a date-string constant. Test calls pass that value explicitly as both from_date and to_date. Existing assertions remain unchanged.

Changes: Date-window test updates

Layer / File(s) Summary
Use explicit date bounds
test/test_date_window_view.py
The tests define DAY as a date string and pass it explicitly as from_date and to_date in window and conversion calls. Existing assertions remain unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 402f3

The change updates test arguments without an identified behavior change. No merge-blocking risk is apparent.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "(Claude) Pass the date window to the view tests as keyword arguments" matches the main change. The PR replaces the shared WINDOW dictionary with a DAY constant and passes from_date=DAY and …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "(Claude) Pass the date window to the view tests as keyword arguments" matches the main change. The PR replaces the shared WINDOW dictionary with a DAY constant and passes from_date=DAY and to_date=DAY explicitly at ten call sites in test/test_date_window_view.py. The "(Claude)" prefix is an author tag and does not describe the change, but the rest of the title clearly names the primary change. Test-only; no behavior change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9977dde6-8d8e-444b-aad2-da05029eeb6a
Commits

Reviewing files that changed from the base of the PR and between fc19a6d and 402f3dd.

Files selected for processing: 1

  • test/test_date_window_view.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@cboos
cboos merged commit c519832 into main Nov 8, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant