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:
Zanie Blue 2023-12-28 10:44:50 -06:00 committed by GitHub
parent f8fc309855
commit 57b6a8cedd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 210 additions and 60 deletions

View file

@ -113,11 +113,17 @@ async def clone_and_compare(
match command:
case RuffCommand.check:
compare, options, kwargs = (compare_check, target.check_options, {})
compare, options, overrides, kwargs = (
compare_check,
target.check_options,
target.config_overrides,
{},
)
case RuffCommand.format:
compare, options, kwargs = (
compare, options, overrides, kwargs = (
compare_format,
target.format_options,
target.config_overrides,
{"format_comparison": format_comparison},
)
case _:
@ -131,6 +137,7 @@ async def clone_and_compare(
baseline_executable,
comparison_executable,
options,
overrides,
cloned_repo,
**kwargs,
)