Skip to content

Support for extending a base configuration file #841

@oalfred

Description

@oalfred

I have been trying to use the extension setting

"ruff.configuration": ...

to point to a base configuration file that I could then override in a project specific pyproject.toml. Analogously to how the ruff setting "extend" works. But any settings I make in pyproject.toml are ignored, which leads me to believe that when "ruff.configuration" is used the extension does not also read the pyproject.toml. Could we have a setting that selects a base config but still allows project specific overrides?

Thank you for your work on this extension!


For completeness, I considered using

[tool.ruff]
extend = "/path/to/shared/config/ruff.toml"

in the pyproject.toml directly but I don't want a hard coded path and despite my best efforts I was not able to find a practical way to set an environment variable in vscode. I also tried using an inline configuration in the workspace settings file like so

"ruff.configuration": {
    "extend": "/path/to/shared/config/ruff.toml"
}

but the server told me Failed to load settings from `configuration`: using `extend` is unsupported for inline configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions