Closed JackDyre closed 1 month ago
Extra args need to be passed in after a --
, so it needs to be
rye lint -- --diff
or
rye fmt -- --diff
This is documented in the --help
but it can be easy to miss I agree
$ rye lint --help
Run the linter on the project.
This invokes ruff in lint mode.
Usage: rye.exe lint [OPTIONS] [PATHS]... [-- <EXTRA_ARGS>...]
Arguments:
[PATHS]...
List of files or directories to limit the operation to
[EXTRA_ARGS]...
Extra arguments to ruff
Other issues where people missed the --
part needed for extra args: https://github.com/astral-sh/rye/issues/1146.
Thanks! Just a RTFM moment on my part.
Steps to Reproduce
ruff check —fix —diff
rye lint —diff
error: unexpected argument found
ruff format —diff
rye fmt —diff
error: unexpected argument found
Expected Result
I assume rye uses ruff for linting and formatting. I would expect the
—diff
flag fromruff format
andruff check —fix
to work with rye.Actual Result
error: unexpected argument found
Version Info
Version
0.38.0
Stacktrace
No response