Skip to content

Conversation

@dreamiurg
Copy link
Owner

Summary

  • Replace mypy with Astral's ty (10-100x faster, Rust-based)
  • Update pyproject.toml, pre-commit, and CI workflow
  • Fix real type errors ty detected that mypy missed

🤖 Generated with Claude Code

Replace mypy with Astral's ty, a faster Rust-based type checker.

- Update pyproject.toml config and dependencies
- Update pre-commit hook to use local ty via uvx
- Update CI workflow to run ty instead of mypy
- Fix type errors ty detected that mypy missed:
  - elevation_ft passed as string instead of int
  - Missing None checks before accessing seasonal_pattern.values()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Refreshed type checking and dependency management configuration across continuous integration, pre-commit hooks, and project development setup.
    • Corrected test data field value for consistency.
  • Tests

    • Enhanced test coverage with additional validations ensuring seasonal pattern calculations work correctly across various window configurations and year wraparound scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The PR replaces mypy with ty as the type-checking tool across CI workflows, pre-commit configuration, and project dependencies. Configuration is migrated from [tool.mypy] to [tool.ty.environment]. Test files are updated with type corrections and additional assertions.

Changes

Cohort / File(s) Summary
Type-checker tool replacement
.github/workflows/ci.yml, .pre-commit-config.yaml, CLAUDE.md, pyproject.toml
Replaces mypy with ty across CI workflows, pre-commit hooks, and dependency declarations. Migrates type-checking configuration from [tool.mypy] to [tool.ty.environment] in pyproject.toml; removes types-beautifulsoup4 dependency.
Test updates
tests/test_cli_errors.py
Corrects elevation_ft from string "1000" to integer 1000 in test data.
Test assertions
tests/test_statistics.py
Adds assertions verifying that seasonal_pattern is not None across three test scenarios: seasonal window variations and year wraparound.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35126c0 and 97a7c63.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .pre-commit-config.yaml
  • CLAUDE.md
  • pyproject.toml
  • tests/test_cli_errors.py
  • tests/test_statistics.py

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@dreamiurg dreamiurg marked this pull request as ready for review January 3, 2026 03:08
@dreamiurg dreamiurg enabled auto-merge (squash) January 3, 2026 03:08
@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.21%. Comparing base (35126c0) to head (97a7c63).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   91.21%   91.21%           
=======================================
  Files           8        8           
  Lines        1081     1081           
=======================================
  Hits          986      986           
  Misses         95       95           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dreamiurg dreamiurg merged commit a2ffd5e into main Jan 3, 2026
12 of 13 checks passed
@dreamiurg dreamiurg deleted the chore/migrate-mypy-to-ty branch January 3, 2026 03:09
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.

2 participants