Skip to content

Remove mypy and clean up type checker suppression comments#3475

Merged
vfdev-5 merged 2 commits intopytorch:masterfrom
rchen152:pyrefly
Dec 16, 2025
Merged

Remove mypy and clean up type checker suppression comments#3475
vfdev-5 merged 2 commits intopytorch:masterfrom
rchen152:pyrefly

Conversation

@rchen152
Copy link
Copy Markdown
Contributor

Fixes #3473

This is a follow-up to #3474, which added the pyrefly type checker. This PR removes mypy and cleans up some ignore comments.

  • Removes mypy from CI, deletes mypy.ini, and switches documentation over to reference pyrefly.
  • Removes 19 # type: ignore comments that mypy used and pyrefly doesn't.
  • Refactors the code a bit and tweaks some type annotations, allowing us to remove 24 # pyrefly: ignore comments.

@github-actions github-actions bot added module: engine Engine module module: metrics Metrics module module: handlers Core Handlers module module: distributed Distributed module module: contrib Contrib module ci CI labels Dec 10, 2025
Copy link
Copy Markdown
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

@rchen152 thanks a lot for the PR ! Looks great!

@vfdev-5 vfdev-5 merged commit 94ffe80 into pytorch:master Dec 16, 2025
21 of 24 checks passed
@rchen152
Copy link
Copy Markdown
Contributor Author

Thanks for the review!

@rchen152 rchen152 deleted the pyrefly branch December 17, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI module: contrib Contrib module module: distributed Distributed module module: engine Engine module module: handlers Core Handlers module module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pyrefly Type Checking?

2 participants