-
-
Notifications
You must be signed in to change notification settings - Fork 24
Fix various type hints #237
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
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 fixes various type hints throughout the codebase and includes a minor functional fix.
- Updates type annotations to use proper syntax (e.g.,
tuple[int, int]instead of(int, int)) - Corrects return type hints for PIL Image objects
- Renames test helper class to avoid confusion with actual test classes
- Adds conditional logic for width/height attributes in picture template tag
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_utils.py | Renamed TestPicture to SamplePicture to avoid confusion with actual test classes |
| pictures/utils.py | Fixed tuple type hint syntax and removed unnecessary parentheses in draw.line() calls |
| pictures/templatetags/pictures.py | Added conditional logic to only include width/height attributes when ratio is None |
| pictures/models.py | Fixed return type hints for Image.Image and dict types; updated xor return type (with issue noted) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 494 495 +1
=========================================
+ Hits 494 495 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
No description provided.