mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:33:50 +00:00
Allow config-file overrides in ecosystem checks (#9286)
Adds the ability to override `ruff.toml` or `pyproject.toml` settings per-project during ecosystem checks. Exploring this as a fix for the `setuptools` project error. Also useful for including Jupyter Notebooks in the ecosystem checks, see #9293 Note the remaining `sphinx` project error is resolved in #9294
This commit is contained in:
parent
f8fc309855
commit
57b6a8cedd
6 changed files with 210 additions and 60 deletions
|
@ -1,7 +1,13 @@
|
|||
"""
|
||||
Default projects for ecosystem checks
|
||||
"""
|
||||
from ruff_ecosystem.projects import CheckOptions, FormatOptions, Project, Repository
|
||||
from ruff_ecosystem.projects import (
|
||||
CheckOptions,
|
||||
ConfigOverrides,
|
||||
FormatOptions,
|
||||
Project,
|
||||
Repository,
|
||||
)
|
||||
|
||||
# TODO(zanieb): Consider exporting this as JSON and loading from there instead
|
||||
DEFAULT_TARGETS = [
|
||||
|
@ -45,7 +51,14 @@ DEFAULT_TARGETS = [
|
|||
Project(repo=Repository(owner="pypa", name="build", ref="main")),
|
||||
Project(repo=Repository(owner="pypa", name="cibuildwheel", ref="main")),
|
||||
Project(repo=Repository(owner="pypa", name="pip", ref="main")),
|
||||
Project(repo=Repository(owner="pypa", name="setuptools", ref="main")),
|
||||
Project(
|
||||
repo=Repository(owner="pypa", name="setuptools", ref="main"),
|
||||
# Since `setuptools` opts into the "preserve" quote style which
|
||||
# require preview mode, we must disable it during the `--no-preview` run
|
||||
config_overrides=ConfigOverrides(
|
||||
when_no_preview={"format.quote-style": "double"}
|
||||
),
|
||||
),
|
||||
Project(repo=Repository(owner="python", name="mypy", ref="master")),
|
||||
Project(
|
||||
repo=Repository(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue