-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Tools: python script cleanups (functionality unchanged) #3123
Tools: python script cleanups (functionality unchanged) #3123
Conversation
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.
This seems absolutely reasonable to me; I do like the type annotations. Otherwise, I don't personally have a lot of investment in following PEP-8 for our code, but also I don't mind following it either.
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.
Like nicole I don't really care about pep8 (and, in fact, I find it can sometimes have too many rules), but this seems OK to me.
Type annotations are always good, though I mostly use them just for the tooling support.
I agree, following pep8 strictly isn't the best (especially with so many rules). Mainly just wanted to increase consistency. |
Thanks for this cleanup! I wanted to use f-strings when I wrote |
My mistake for not double checking the backslash problem with f-strings, I have reverted that change for now. The other option would be something like this: my_string = f"This is a backslash: {chr(92)}" 92 being the ASCII code for a backslash print(f"output: {result['output'].replace(f'{chr(92)}r{chr(92)}n', f'{chr(92)}n')}") Definitely not the best solution but seems to be necessary to get away from |
✅ No C++, so no modules impact! 😸 |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for improving these scripts - and congratulations on your first microsoft/STL commit! 🎉 😸 🐍 |
🎉🚀🎉 |
Aligning the python scripts closer to the PEP-8 style guide & some other cleanups.
Functionality is completely unchanged, these suggestions are purely formatting and readability updates. Hopefully bringing some of this code closer to the incredible standards maintained by this team.