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

Including import sorting in fmt command #804

Open
cnpryer opened this issue Feb 27, 2024 · 1 comment
Open

Including import sorting in fmt command #804

cnpryer opened this issue Feb 27, 2024 · 1 comment

Comments

@cnpryer
Copy link
Contributor

cnpryer commented Feb 27, 2024

Based off of the discussion in astral-sh/ruff#8232, I'm not sure what makes the most sense for Rye today. But I wanted to at least document this feedback here.

I usually have CI for the following:

  • Check formatting
  • Check code

I use rye lint to handle the second one and rye fmt --check to handle the first. I imagine, eventually I could do something like:

  • First check formatting
  • Then check everything else

I haven't thought much about how a rye check impacts this.

But today, unless I'm missing something, in order to include formatting for imports I need to add ruff check --select I --fix if I wanted to cover that.

I haven't thought too deeply about those discussions I've linked, but my thoughts today are that I'd like for Rye to handle this with rye fmt.

Related:

@bcorfman
Copy link

Give rye fmt -q -- --select I --fix or rye fmt -v -- --select I --fix a try ... quiet or noisy, whichever works for you.

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