mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:09:22 +00:00
Run ecosystem checks with preview mode enabled (#8358)
Until https://github.com/astral-sh/ruff/issues/8076 is ready, it seems beneficial to get feedback on preview mode changes. Tested locally, updated logs to output the flags passed to `ruff` and verified `--preview` is used.
This commit is contained in:
parent
e9acb99f7d
commit
3fc920cd12
5 changed files with 88 additions and 58 deletions
|
@ -73,6 +73,10 @@ def entrypoint():
|
|||
ruff_comparison,
|
||||
)
|
||||
|
||||
targets = DEFAULT_TARGETS
|
||||
if args.force_preview:
|
||||
targets = [target.with_preview_enabled() for target in targets]
|
||||
|
||||
with cache_context as cache:
|
||||
loop = asyncio.get_event_loop()
|
||||
main_task = asyncio.ensure_future(
|
||||
|
@ -80,7 +84,7 @@ def entrypoint():
|
|||
command=RuffCommand(args.ruff_command),
|
||||
ruff_baseline_executable=ruff_baseline,
|
||||
ruff_comparison_executable=ruff_comparison,
|
||||
targets=DEFAULT_TARGETS,
|
||||
targets=targets,
|
||||
format=OutputFormat(args.output_format),
|
||||
project_dir=Path(cache),
|
||||
raise_on_failure=args.pdb,
|
||||
|
@ -131,6 +135,11 @@ def parse_args() -> argparse.Namespace:
|
|||
action="store_true",
|
||||
help="Enable debugging on failure",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--force-preview",
|
||||
action="store_true",
|
||||
help="Force preview mode to be enabled for all projects",
|
||||
)
|
||||
parser.add_argument(
|
||||
"ruff_command",
|
||||
choices=[option.name for option in RuffCommand],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue