-
Notifications
You must be signed in to change notification settings - Fork 25
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
Clean-up common_factories.py #630
base: dev
Are you sure you want to change the base?
Conversation
2eac25e
to
c6caa3e
Compare
c6caa3e
to
669c193
Compare
1. Eliminate star imports. Import what you use. 2. Eliminate redundant f-strings without placeholders. 3. Fix wrong escape \ character in Windows-like paths. 4. Eliminate (some) long lines over 80 characters.
Thanks, looks good. |
👍 @cvicentiu you might want to challenge/update what's in https://github.com/MariaDB/buildbot/blob/dev/.pylintrc particularly https://github.com/MariaDB/buildbot/blob/dev/.pylintrc#L9 |
@fauust thanks, there are many files still using star imports, I'll keep note to disable that once all have been cleaned. |
@@ -274,7 +298,7 @@ def addWinTests( | |||
"dojob", | |||
'"', | |||
util.Interpolate( | |||
f'"C:\Program Files (x86)\Microsoft Visual Studio\\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=%(kw:arch)s && cd mysql-test && {cmd}', | |||
f'"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat" -arch=%(kw:arch)s && cd mysql-test && {cmd}', |
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.
@cvicentiu
Why do you think \
needs to be escaped?
Buildbot-worker
is already handling string interpolation on Windows.
Look for example on line 0 in https://buildbot.mariadb.org/#/builders/234/builds/35330/steps/11/logs/stdio
dojob ^"\^"^" ^"\^"C:\Program Files ^(x86^)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat\^" -arch=x64 ^&^& cd mysql-test ^&^& ..\mysql-test\collections\buildbot_suites.bat ^&^& cd ..^" ^"\^"^"
This is one PR out of a sequence to refactor code in BB to make it more maintainable.
This commit should not cause any practical functional changes (to check windows builder paths).
A list of refactoring changes covered in this PR:
NOTE: I HAVE NOT TESTED THIS COMMIT. It should be run in dev to ensure it works.