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

Fixes namedtuple type name #2961

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Fixes namedtuple type name #2961

merged 1 commit into from
Sep 29, 2021

Conversation

sobolevn
Copy link
Contributor

Motivation

The best practice is to match typename with variable name.
For example, mypy reports any other usages as errors: python/mypy#11206 (comment)

The best practice is to match `typename` with variable name.
For example, `mypy` reports any other usages as errors: python/mypy#11206 (comment)
@hvy
Copy link
Member

hvy commented Sep 28, 2021

@toshihikoyanase , @keisuke-umezawa do you have time to review this change?

@toshihikoyanase toshihikoyanase added the test Unit test. label Sep 28, 2021
Copy link
Member

@toshihikoyanase toshihikoyanase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR! It will prevent future CI failure. LGTM!

  • The official Python document also sets the same class name to the typename argument, and
  • we don't have a particular reason to add _ to the typenames.

Copy link
Member

@keisuke-umezawa keisuke-umezawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@keisuke-umezawa keisuke-umezawa merged commit 59163b8 into optuna:master Sep 29, 2021
@keisuke-umezawa keisuke-umezawa added the code-fix Change that does not change the behavior, such as code refactoring. label Sep 29, 2021
@keisuke-umezawa keisuke-umezawa added this to the v2.10.0 milestone Sep 29, 2021
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. test Unit test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants