-
Notifications
You must be signed in to change notification settings - Fork 18.5k
adapt pyrefly #27710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adapt pyrefly #27710
Conversation
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the ty type checker with pyrefly for static type analysis in the API codebase. The change includes removing the ty dependency and adding configuration for the new pyrefly tool.
Key changes:
- Removed the
typackage dependency from dev dependencies - Added
pyrefly.tomlconfiguration file with project-specific exclusions and settings - Updated CI workflow to enforce
pyreflychecks (removed|| truefallback) - Added type annotation to
beat_schedulevariable inext_celery.py
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| api/uv.lock | Removed ty package entries and updated lock file |
| api/pyproject.toml | Removed ty~=0.0.1a19 from dev dependencies |
| api/pyrefly.toml | Added configuration for pyrefly type checker with exclusions |
| api/extensions/ext_celery.py | Added explicit type annotation for beat_schedule variable |
| .github/workflows/api-tests.yml | Removed ` |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adapts the project for pyrefly, a static analysis tool, by adding its configuration and removing the ty dependency. The changes are mostly configuration-related. I've found a few areas for improvement, mainly regarding a missing import for a new type hint and some redundancies in the new pyrefly.toml configuration file that could be cleaned up for better maintainability.
Important
Fixes #<issue number>.Summary
fix #22591
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods