Skip to content

[Pyrefly][Init] Add non-interactive mode to pyrefly init#2587

Open
migeed-z wants to merge 1 commit intomainfrom
add-non-interactive-init-flag
Open

[Pyrefly][Init] Add non-interactive mode to pyrefly init#2587
migeed-z wants to merge 1 commit intomainfrom
add-non-interactive-init-flag

Conversation

@migeed-z
Copy link
Contributor

@migeed-z migeed-z commented Feb 28, 2026

Currently, mypy primer does not run with any configs, which is wrong. We should invoke pyrefly init and generate a config file for every project. To do this for CI purposes, workflow purposes and experiment purposes, we should also have a non interactive mode. This diff adds this mode, which declines suppressing errors and overriding configs (for CI there are no existing pyrefly configs anyway).

Skip interactive prompts with safe defaults (decline all) when
--non-interactive is set, enabling use in CI and scripted workflows
like the mypy primer. Replaces the cfg!(test) hack with an explicit
flag on InitArgs.
@meta-cla meta-cla bot added the cla signed label Feb 28, 2026
@migeed-z migeed-z changed the title test [Pyrefly][Init] Add non-interactive mode to pyrefly init Feb 28, 2026
@github-actions
Copy link

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

@meta-codesync
Copy link

meta-codesync bot commented Feb 28, 2026

@migeed-z has imported this pull request. If you are a Meta employee, you can view this in D94755976.

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.

1 participant