Skip to content
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

Enable mypy, part 1 #7442

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Enable mypy, part 1 #7442

merged 1 commit into from
Jan 3, 2025

Conversation

mergennachin
Copy link
Contributor

Summary:

This is the first PR to enable MyPy typechecker.

There are few next steps, but this can land as-is as a standalone PR.

Will keep enabling in smaller batches, via directory by directory.

Also side note, pyre-ignore can be migrated to "# type: ignore" since pyre is backwards compatible with mypy.

Summary

Fixes #7441

Test plan

Run lintrunner

Copy link

pytorch-bot bot commented Dec 26, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7442

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 77434bd with merge base 2600cc8 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 26, 2024
@facebook-github-bot
Copy link
Contributor

@mergennachin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mergennachin mergennachin force-pushed the update-lints branch 4 times, most recently from 8846628 to ff010bc Compare January 2, 2025 22:57
@facebook-github-bot
Copy link
Contributor

@mergennachin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mergennachin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:

This is the first PR to enable MyPy typechecker.

There are few next steps, but this can land as-is as a standalone PR.

Will keep enabling in smaller batches, via directory by directory.

Also side note, pyre-ignore can be migrated to "# type: ignore" since pyre is backwards compatible with mypy.
@facebook-github-bot
Copy link
Contributor

@mergennachin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mergennachin
Copy link
Contributor Author

there was some discrepancy between running lintrunner/mypy locally vs in CI. was succeeding locally but failing in CI, so couldn't figure out the rootcause for a while.

apparently, i had to install executorch (via install_requirements.py) before running mypy, otherwise, it was getting confused.
ended up changing the CI job config for lintrunner.

will merge soon once the internal tests pass.

@mergennachin mergennachin merged commit c86b39d into main Jan 3, 2025
115 checks passed
@mergennachin mergennachin deleted the update-lints branch January 3, 2025 15:27
@mergennachin mergennachin mentioned this pull request Jan 3, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable mypy typechecker tracker
4 participants