Skip to content

Ask before creating a Pyrefly baseline during BasedPyright migration - #5127

Open
sathariels wants to merge 6 commits into
facebook:mainfrom
sathariels:init-basedpyright-baseline
Open

sathariels wants to merge 6 commits into
facebook:mainfrom
sathariels:init-basedpyright-baseline

Conversation

@sathariels

Copy link
Copy Markdown

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

  • Yes writes the baseline setting and creates the file
  • No leaves the config unchanged and does not create the file

@meta-codesync

meta-codesync Bot commented Oct 7, 2026

Copy link
Copy Markdown
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.)

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate baseline from BasedPyright config

2 participants