Skip to content

Flags for all ConfigFile options #458

Open
6 of 7 issues completed
Open
Feature
6 of 7 issues completed
@connernilsen

Description

@connernilsen

This is ConfigFile. ConfigFile configures the settings in Pyrefly, and it's what a pyrefly.toml or pyproject.toml is read into and passed around.

Currently, a few of the config options (python_interpreter, project_includes, ...) are configurable by command flags and environment variables, but it would be nice if everything could be configurable. We read in CLI flags (especially those for config overrides) with ConfigOverrideArgs, and override the ConfigFile in check::Args::override_config().

Let's add the missing config overrides so they can be configured by CLI flags or env vars, and make sure to override them in the config file. We'll also need to update our configuration documentation with the changes that are made.

Rules for new config override flags that are added:

  • Pretty much just follow the existing format 😃
  • If a config option has serde(skip), it is not meant to be serialized or deserialized. Please don't add it.
  • All configs should have a clap_env() env. This creates a PYREFLY_-prefixed env override that clap checks for.

If you'd like to add one of these config overrides, just add yourself to the sub-task and get started!

Let us know if you have any questions about how you plan to implement this, or if you run into issues along the way! You can do that directly on the sub-task or in our Discord server!

Sub-issues

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions