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

Option to choose formatter, Black as default #562

Open
akaihola opened this issue Mar 17, 2024 · 0 comments · May be fixed by #568
Open

Option to choose formatter, Black as default #562

akaihola opened this issue Mar 17, 2024 · 0 comments · May be fixed by #568
Assignees
Labels
enhancement New feature or request many-formatters Support for multiple code formatters and skipping formatting

Comments

@akaihola
Copy link
Owner

akaihola commented Mar 17, 2024

There are feature requests for

For these, a command line and configuration option for choosing (or omitting) the formatter is needed.

In discussion for #304, a --format= or --formatter= option was proposed. The --format= variant was preferred since it corresponds to the name of the --lint= option (not --linter=). On the other hand, now that linting is moving to the separate Graylint package anyway, maybe we could also use the more descriptive variant --formatter=.

In the first phase, we would just add --format= with the default value of --format=black and no other supported options. This would pave the way for adding other formatters.

In pyproject.toml, a corresponding format = option would be added, with format = "black" as the default.

See also:

@akaihola akaihola added the enhancement New feature or request label Mar 17, 2024
@akaihola akaihola self-assigned this Mar 17, 2024
@akaihola akaihola added the many-formatters Support for multiple code formatters and skipping formatting label Mar 17, 2024
@akaihola akaihola changed the title Add option to choose formatter Add option to choose formatter, Black as default Mar 17, 2024
@akaihola akaihola changed the title Add option to choose formatter, Black as default Option to choose formatter, Black as default Mar 17, 2024
akaihola added a commit that referenced this issue Mar 20, 2024
The only supported value for now is `black`.

Fixes #562
@akaihola akaihola linked a pull request Mar 20, 2024 that will close this issue
1 task
akaihola added a commit that referenced this issue Mar 26, 2024
The only supported value for now is `black`.

Fixes #562
akaihola added a commit that referenced this issue Mar 26, 2024
The only supported value for now is `black`.

Fixes #562
akaihola added a commit that referenced this issue Mar 27, 2024
The only supported value for now is `black`.

Fixes #562
akaihola added a commit that referenced this issue Mar 30, 2024
The only supported value for now is `black`.

Fixes #562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request many-formatters Support for multiple code formatters and skipping formatting
Projects
Development

Successfully merging a pull request may close this issue.

1 participant