Skip to content

Conversation

@rchen152
Copy link
Contributor

I have made things!

This PR proposes running the pyrefly type checker (which I am a maintainer of) over the assert_type tests. Pyrefly has built-in django support that uses django-stubs, and running pyrefly over these tests to make sure it stays compatible with the stubs would be helpful for us.

Notes:

  • I've configured pyrefly to ignore # type: ignore comments and added # pyrefly: ignore comments where needed, following what was done for pyright.
  • In test_enums.py, I've changed some of the assert_types to accept both mypy and pyrefly's output, in cases in which both look reasonable to me. Happy to revert this change if the preference is to keep mypy's output as the source of truth.

Related issues

Refs #579

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks a lot!

Having more typecheckers is totally a great thing for the project.

@sobolevn sobolevn merged commit 24d277c into typeddjango:master Nov 25, 2025
44 checks passed
@rchen152 rchen152 deleted the pyrefly branch November 25, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants