-
Notifications
You must be signed in to change notification settings - Fork 462
Enable Pyrefly in Geti Tune #5178
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
base: develop
Are you sure you want to change the base?
Conversation
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 mypy with Pyrefly as the static type checker for the Geti Tune application backend. The change updates CI workflows and pre-commit configurations, while adding Pyrefly-specific type ignore comments throughout the codebase to address type checking issues identified by the new tool.
Changes:
- Replaced mypy with Pyrefly (~0.46.3) in project dependencies and configurations
- Added Pyrefly ignore comments to address type checking issues across multiple files
- Removed redundant null-checking tests and simplified type annotations
- Updated model definitions to support better type inference with generics
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| application/backend/pyproject.toml | Replaced mypy dependency with Pyrefly and updated configuration |
| .github/workflows/backend-lint-and-test.yaml | Updated CI workflow to use Pyrefly instead of mypy |
| application/backend/.pre-commit-config.yaml | Updated pre-commit hooks to use Pyrefly |
| application/backend/app/utils/visualization.py | Added type generics and Pyrefly ignore comments |
| application/backend/app/core/jobs/models/job.py | Introduced JobParamsT TypeVar for better type safety |
| application/backend/app/models/dataset_item.py | Changed subset field default from nullable to UNASSIGNED |
| application/backend/tests/unit/test_visualization.py | Removed redundant null-checking tests |
| Multiple service and API files | Added Pyrefly ignore comments for type checking issues |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
Summary
This PR enables Pyrefly as a static type checker for the Python code in Geti Tune (application), replacing mypy.
CI workflows and pre-commit checks are updated accordingly.
Resolves #5169
How to test
Checklist