-
Notifications
You must be signed in to change notification settings - Fork 349
ruff: Removes all the ANN type ignores and fixes them #1237
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 removes all ANN (type annotation) type ignores from the Ruff configuration and adds proper type annotations throughout the codebase to fix the linting violations.
- Adds comprehensive type annotations to function parameters and return types
- Introduces new type aliases
_User
and_UserModel
for better type safety with Django user models - Updates imports to support proper type checking with TYPE_CHECKING blocks
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Removes ANN-related ignore rules from Ruff configuration |
pytest_django/django_compat.py | Adds type aliases for Django user models |
pytest_django/fixtures.py | Adds type annotations to fixture functions and classes |
pytest_django/plugin.py | Adds type annotations to internal functions |
pytest_django/live_server_helper.py | Adds type annotation to __add__ method |
pytest_django/asserts.py | Adds comprehensive type annotations to assertion functions |
tests/test_fixtures.py | Adds type annotations and updates test function signatures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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.
Lowest risk