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

Reformat code to comply with the Black 2024 Code Style. #5208

Closed
pkoz opened this issue Jan 28, 2024 · 1 comment · Fixed by #5210
Closed

Reformat code to comply with the Black 2024 Code Style. #5208

pkoz opened this issue Jan 28, 2024 · 1 comment · Fixed by #5210
Labels
code-fix Change that does not change the behavior, such as code refactoring.

Comments

@pkoz
Copy link
Contributor

pkoz commented Jan 28, 2024

Motivation

The black library released a new version that implements the 2024 stable style.

It breaks tests because the black dependency in pyproject.toml has no constraint on the version.

Suggestion

  • Quick fix: add the version constraint

optuna/pyproject.toml

Lines 53 to 55 in 073abfc

checking = [
"black",
"blackdoc",

to:

checking = [
    "black<24.0.0"
    "blackdoc",
  • Actual fix: reformat about 30 lines of code to comply with the Black 2024 Code Style.

Additional context (optional)

No response

@pkoz pkoz added the code-fix Change that does not change the behavior, such as code refactoring. label Jan 28, 2024
@nzw0301
Copy link
Member

nzw0301 commented Jan 29, 2024

Thank you for reporting it. When I used the latest black I encountered the following issues:

Thus the proposed hotfix sounds nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-fix Change that does not change the behavior, such as code refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants