Repository navigation
Ask before creating a Pyrefly baseline during BasedPyright migration - #5127
Open
sathariels wants to merge 6 commits into
Open
sathariels wants to merge 6 commits into
sathariels wants to merge 6 commits into
Conversation
…t baseline exists. The old baseline file is only used as a signal. Its error entries are left untouched.
…ht baseline is found, init records the new path and fills the file only if the user agrees. Declining prints the command to create it later.
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D123757405. (Because this pull request was imported automatically, there will not be any future comments.) |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When pyrefly init finds a BasedPyright baseline, it asks whether to create pyrefly_baseline.json in the project root. The old file is left as-is, since the error codes and columns do not match.
Saying yes adds baseline = "pyrefly_baseline.json" and fills that file with the errors Pyrefly reports now. Saying no leaves the config alone, so it does not point at a file that was never created, and prints the config line plus pyrefly check --update-baseline for later.
Fixes #5077
Test plan