-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Updating by fstring #667
Updating by fstring #667
Conversation
Good catch! |
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.
append(…
could likely be replaced with f-strings for other lines as well.
To avoid further confusion while working on this issue, I’ve added examples to the issue kanban.
|
…improved readability
…LSID registration
if hasattr(head.struct, "_recordinfo_"): | ||
print( | ||
" _recordinfo_ = %r" % (head.struct._recordinfo_,), | ||
f" _recordinfo_ = {head.struct._recordinfo_!r}", |
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.
It's a bit complicated, but it's equivalent, so there's no problem.
>>> info = ('{07D2AEE5-1DF8-4D2C-953A-554ADFD25F99}', 1, 0, 0, '{00FABB0F-5691-41A6-B7C1-11606671F8E5}')
>>> f" _recordinfo_ = {info!r}"
" _recordinfo_ = ('{07D2AEE5-1DF8-4D2C-953A-554ADFD25F99}', 1, 0, 0, '{00FABB0F-5691-41A6-B7C1-11606671F8E5}')"
>>> " _recordinfo_ = %r" % (info,)
" _recordinfo_ = ('{07D2AEE5-1DF8-4D2C-953A-554ADFD25F99}', 1, 0, 0, '{00FABB0F-5691-41A6-B7C1-11606671F8E5}')"
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.
Thanks for your efforts.
I’ve reviewed several PRs related to #657 and have come to the conclusion that the optimal amount of changes for this type of replacement is about 30 lines per PR.
Of course, there may be cases related to #657 where changes exceeding 30 lines are necessary for a single file. In such cases, please create a PR for that file only.
Related to #657
Out of scope
Note
I investigated by
git grep -n '%[sdxXorfFeEgGc]' | grep -v 'logger\.debug' | grep -v '_debug' | grep -v '_warning' | grep -v 'logger\.info' | grep -v '_error'
The following code would be listed with this command.
So Issue's todo list will be changed.