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

No possibility to select yapf as auto-formatter in preferences #16964

Closed
Firestar-Reimu opened this issue Dec 6, 2021 · 3 comments
Closed

No possibility to select yapf as auto-formatter in preferences #16964

Firestar-Reimu opened this issue Dec 6, 2021 · 3 comments
Assignees
Milestone

Comments

@Firestar-Reimu
Copy link

autopep8                  1.5.7
black                     19.10b0
yapf                      0.31.0

But I can only choose autopep8 or black in auto-formatter. I use spyder on Linux

spyder                    5.1.5
@steff456
Copy link
Member

steff456 commented Dec 6, 2021

Hi @Firestar-Reimu,

We decided to not include yapf in the auto formatter options because the server doesn't support changing the maximum line length and other options that are in the preferences dialog. This made really hard to include it and made the current UI work for it. We are waiting for them to add these options into the server so we can add it smoothly in Spyder.

For now, we are unable to add it to Spyder.

@steff456 steff456 closed this as completed Dec 6, 2021
@Firestar-Reimu
Copy link
Author

Firestar-Reimu commented Dec 7, 2021

  1. Sorry, because I see that you wrote "Spyder can use autopep8, yapf or black to format your code" in the settings
  2. You say server, what about in the local environment (in my own computer)?

@ccordoba12
Copy link
Member

Hey @Firestar-Reimu, you're right: in our preferences we say that support Yapf, but it's not available for selection:

imagen

The truth is we can't support Yapf at the moment because it doesn't allow us to set the maximum line length. We'll try to fix that in the future, but for now we'll change that message to say that we only support Black and Autopep8.

@ccordoba12 ccordoba12 reopened this Dec 7, 2021
@ccordoba12 ccordoba12 changed the title No yapf in auto-formatter No possibility to select yapf as auto-formatter in preferences Dec 7, 2021
@ccordoba12 ccordoba12 self-assigned this Dec 7, 2021
@ccordoba12 ccordoba12 added this to the v5.2.1 milestone Dec 7, 2021
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

3 participants