Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying multiple configuration files #2901

Closed
not-my-profile opened this issue Jan 20, 2022 · 3 comments
Closed

Allow specifying multiple configuration files #2901

not-my-profile opened this issue Jan 20, 2022 · 3 comments
Labels
as designed Not a bug, working as intended enhancement request New feature or request

Comments

@not-my-profile
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I'd like to have one pyrightconfig.json config for development environments like VS Code and one pyrightconfig-ci.json for the CI. The config for the CI turns out to be a superset of the other config file and I'd like to avoid having to duplicate the configuration.

Describe the solution you'd like
It would be nice if pyright could be invoked with multiple configuration files, e.g:

pyright -p pyrightconfig.json -p pyrightconfig-ci.json

where settings specified in a later configuration file would override the settings of earlier configuration files.

@not-my-profile not-my-profile added the enhancement request New feature or request label Jan 20, 2022
@erictraut
Copy link
Collaborator

The configuration logic in pyright is already very complex because it needs to merge config information from pyrightconfig.json, language server settings, and command-line options.

Merging of multiple configuration files would add more complexity. I don't think it's a simple as one overriding another because some of the configurations options interact with others.

So we don't have any plans at this time to support multiple configuration files.

This could be something we reconsider in the future, but for now you'll need to use duplicate configuration files.

@erictraut erictraut added the as designed Not a bug, working as intended label Mar 4, 2022
@efine-vivodyne
Copy link

it needs to merge config information from pyrightconfig.json, language server settings, and command-line options.

is there a way via the command line to override a setting in pyrightconfig.json? that would be great, but I couldn't find out how to do that from the documentation

@erictraut
Copy link
Collaborator

is there a way via the command line to override a setting in pyrightconfig.json?

A few options are available by command-line. Many are not. If you need to override those, you can emit a temporary pyrightconfig.json file and use the -p option from the command-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
as designed Not a bug, working as intended enhancement request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants