Skip to content

Conversation

@AryanBagade
Copy link
Contributor

Summary

Adds support for setting the baseline file path in pyrefly.toml or pyproject.toml, so users don't need to pass --baseline on every invocation.

  # pyrefly.toml
  baseline = "baseline.json"
  • Add baseline field to ConfigFile struct
  • Read baseline from config when CLI flag not provided
  • CLI --baseline takes precedence over config
  • Update documentation

Fixes #2119

Test Plan

  • Added unit test for parsing baseline from config
  • Updated test_rewrite_with_path_to_config to include baseline path
  • Ran python3 test.py -> all tests pass
  • Manual testing: verified baseline works from config, CLI override works

@meta-cla meta-cla bot added the cla signed label Jan 16, 2026
@github-actions
Copy link

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@grievejia grievejia self-assigned this Jan 16, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 16, 2026

@grievejia has imported this pull request. If you are a Meta employee, you can view this in D90895437.

Copy link
Contributor

@yangdanny97 yangdanny97 left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link

meta-codesync bot commented Jan 20, 2026

@grievejia merged this pull request in ce020ef.

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.

Support specifying baseline in the configuration

4 participants