-Start using argparse instead of mimicking CLI parsing.
-PEPify the code.
-Decrease the number of imports by slightly cleaning up the script.
Details
Diff Detail
Event Timeline
| clang-tidy/rename_check.py | ||
|---|---|---|
| 113 | the script always prints the args, is it intentional ? | |
| clang-tidy/rename_check.py | ||
|---|---|---|
| 113 | Aw, a leftover from debugging. Good catch! Thanks for the note! | |
Kirill, if you still have time for this, could you submit reformatting as a separate patch to make semantic changes more visible?
Reversed "tabwidth:2 -> tabwidth:4" change.
Removed unused dependency (re).
Got rid of sys.argv[0] via using Pythonic __file__ and removed (now) redundant dependency (sys).
One nit. Otherwise looks good. Thank you!
| clang-tidy/rename_check.py | ||
|---|---|---|
| 89–92 | Does PEP8 have any preferences with regard to using a terminating backslash over enclosing an expression that needs to be wrapped in parentheses? If no, I'd better use parentheses. | |
Addressing comments Alex made about line breaks.
| clang-tidy/rename_check.py | ||
|---|---|---|
| 89–92 | Hm, apparently it does. 
 Didn't know it, though. Thank you for pointing it out! | |
Does PEP8 have any preferences with regard to using a terminating backslash over enclosing an expression that needs to be wrapped in parentheses? If no, I'd better use parentheses.