Repository navigation
Updating by fstring - #667
Conversation
Good catch! |
junkmd
left a comment
There was a problem hiding this comment.
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.
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.
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.