-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python] added f-strings to helpers/parameter_generator.py #4146
Conversation
I merged in the latest changes from the I also patched a few small mistakes in 63ebdaf. Importantly, the linting errors observed in #4146 (comment) were a result of incorrect escaping of literal curly braces. I learned tonight, from https://docs.python.org/3/library/string.html#format-string-syntax, that you should use a x = "hello"
f"{x}, {{curly braces}}"
# 'hello, {curly braces}' I also ran @StrikerRUS I think this is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me, but since I added a few changes I don't think my approval should count towards a merge.
Ah, missed one suggestion: LightGBM/helpers/parameter_generator.py Line 300 in 08d1ce4
This string is not needed to be converted into f-string. But I think we can change outer " quotes to ' ones to remove escaping in this PR.
|
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
ok. Updated in 62f3380 |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
No description provided.