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

Documentation: add --no-preview to --help #7486

Closed
bersbersbers opened this issue Sep 18, 2023 · 2 comments · Fixed by #7504
Closed

Documentation: add --no-preview to --help #7486

bersbersbers opened this issue Sep 18, 2023 · 2 comments · Fixed by #7504
Labels
documentation Improvements or additions to documentation

Comments

@bersbersbers
Copy link
Contributor

I like using ruff with preview rules, locally - so I have added preview = true to my pyproject.toml, and it seems to be picked up by VS Code, pre-commit, and manual command-line invocations of ruff. However, I think I would prefer new preview rules to break CI. I could pin the ruff version, but would like to avoid that ideally. Could the --preview command-line flag be made switchable, e.g., to allow ruff --preview=false on CI?

@dhruvmanila
Copy link
Member

I believe you're looking for the --no-preview flag.

@dhruvmanila dhruvmanila added the question Asking for support or clarification label Sep 18, 2023
@bersbersbers
Copy link
Contributor Author

@dhruvmanila yes, thanks! It probably needs to be added to --help then:

>ruff --version                             
ruff 0.0.290

>ruff check --help | wsl grep preview       
      --preview
          Enable preview mode; checks will include unstable rules and fixes

@bersbersbers bersbersbers changed the title Feature request: be able to disable preview Documentation: add --no-preview to --help Sep 18, 2023
@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Sep 18, 2023
charliermarsh added a commit that referenced this issue Sep 19, 2023
I'd really like this to render as `--preview / --no-preview`, but I
looked for a while in the Clap internals and issue tracker
(clap-rs/clap#815) and I really can't figure
out a way to do it -- this seems like the best we can do? It's also what
they do in Orogene.

Closes #7486.
@dhruvmanila dhruvmanila removed the question Asking for support or clarification label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants