Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to run rye fmt with the --preview flag #1089

Open
Vulwsztyn opened this issue May 17, 2024 · 1 comment
Open

A way to run rye fmt with the --preview flag #1089

Vulwsztyn opened this issue May 17, 2024 · 1 comment

Comments

@Vulwsztyn
Copy link

I'd like to run rye fmt with the --preview flag, but can see no such option in help

> rye fmt --help 
Run the code formatter on the project.

This invokes ruff in format mode.

Usage: rye fmt [OPTIONS] [PATHS]... [-- <EXTRA_ARGS>...]

Arguments:
  [PATHS]...
          List of files or directories to limit the operation to

  [EXTRA_ARGS]...
          Extra arguments to ruff

Options:
  -a, --all
          Perform the operation on all packages

  -p, --package <PACKAGE>
          Perform the operation on a specific package

      --pyproject <PYPROJECT_TOML>
          Use this pyproject.toml file

  -v, --verbose
          Enables verbose diagnostics

  -q, --quiet
          Turns off all output

      --check
          Run format in check mode

  -h, --help
          Print help (see a summary with '-h')
@bluss
Copy link
Contributor

bluss commented May 19, 2024

It should work if you put it where it says EXTRA_ARGS in the docs. Note that rye's bundled ruff is trailing the ruff project by some versions, currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants