Skip to content

chore: switch from mypy to pyrefly#675

Merged
terrykong merged 2 commits intomainfrom
tk/pyrefly
Jul 28, 2025
Merged

chore: switch from mypy to pyrefly#675
terrykong merged 2 commits intomainfrom
tk/pyrefly

Conversation

@terrykong
Copy link
Collaborator

@terrykong terrykong commented Jul 16, 2025

Partially addresses #667

Switches us to pyrefly from mypy which now allows us to static type check as part of pre-commit!

I've included all the files that I've fixed so as of this PR 75/98 files have 0 errors. I've added those to the whitelist to track regressions in static typing in those files. Once we've addressed all typing issues, we can just glob match the core code.

Additionally, there's a CI job that will fail if there's 0 errors and it's not in the whitelist. This helps us prevent regressions and move strictly to better coverage

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 16, 2025
@terrykong
Copy link
Collaborator Author

@github-actions github-actions bot added CI Relating to CI and removed documentation Improvements or additions to documentation labels Jul 16, 2025
@terrykong terrykong marked this pull request as ready for review July 16, 2025 22:43
SahilJain314
SahilJain314 previously approved these changes Jul 23, 2025
Copy link
Contributor

@SahilJain314 SahilJain314 left a comment

Choose a reason for hiding this comment

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

Looks good to me, happy to merge. (I assume you need to remove the example that's causing the failed lint check)

@terrykong
Copy link
Collaborator Author

oh actually, it fails b/c i fixed a few more typing issues and forgot to add them to the whitelist to prevent regressions. let me add the new ones

@terrykong terrykong disabled auto-merge July 23, 2025 22:58
SahilJain314
SahilJain314 previously approved these changes Jul 24, 2025
@SahilJain314 SahilJain314 added this pull request to the merge queue Jul 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2025
@terrykong terrykong added the CI:L0 Run doctests and unit tests label Jul 25, 2025
@terrykong terrykong force-pushed the tk/pyrefly branch 2 times, most recently from 3ae204b to ac56050 Compare July 26, 2025 07:05
@terrykong terrykong added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels Jul 26, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: Terry Kong <terryk@nvidia.com>
@terrykong terrykong added this pull request to the merge queue Jul 28, 2025
Merged via the queue into main with commit 01b8532 Jul 28, 2025
15 checks passed
@terrykong terrykong deleted the tk/pyrefly branch July 28, 2025 04:07
xxman-google pushed a commit to xxman-google/NeMo-RL that referenced this pull request Jul 28, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
wedu-nvidia pushed a commit to wedu-nvidia/RL that referenced this pull request Jul 30, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
xxman-google pushed a commit to xxman-google/NeMo-RL that referenced this pull request Jul 30, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
FannYYW pushed a commit to xxman-google/NeMo-RL that referenced this pull request Aug 5, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
FannYYW pushed a commit to xxman-google/NeMo-RL that referenced this pull request Aug 5, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
soodoshll pushed a commit to soodoshll/RL that referenced this pull request Aug 13, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: Qidong Su <qidongs@nvidia.com>
jiemingz pushed a commit that referenced this pull request Aug 20, 2025
Signed-off-by: Terry Kong <terryk@nvidia.com>
@terrykong terrykong linked an issue Dec 17, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L0 Run doctests and unit tests CI Relating to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fast static type checker and complete static typing coverage

2 participants