-
Notifications
You must be signed in to change notification settings - Fork 307
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
Refactor logging functions to use %s formatting instead of f-strings #3822
Refactor logging functions to use %s formatting instead of f-strings #3822
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.
Thank you for the PR, @StarKBhaviN! Could you please fix the failing tests?
Using pre-commit will help in fixing the code style errors: https://github.com/mozilla/bugbug#auto-formatting
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.
Thank you, @StarKBhaviN! Could you please take care of the following:
- Drop unrelated changes
- Link the PR to the issue that it is fixing (in the PR description1)
- Edit the PR title to clarify that this is related to logging
Footnotes
- Dropped all unrelated changes. - Bug fixes as mentioned
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
- Reverted all unwanted changes. - Issue resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
Because the PR still changes the |
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.
Thank you @StarKBhaviN! The changes to the following files are not related to this PR. Please revert the changes:
- .flake8
- bugbug/labels/regression_bug_nobug.csv
- http_service/.dockerignore
- tests/fixtures/bug_features/nightly_uplift.json
- tests/fixtures/bugs.json
Co-authored-by: Suhaib Mujahid <[email protected]>
…m/StarKBhaviN/bugbug into fix/logging-fstring-interpolation
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.
Please rename the PR to something more descriptive (e.g., “Use %s formatting instead of f-string in logging functions”). Also, could you please link to the issue in the PR description?1
Footnotes
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.
LGTM! Thank you, @StarKBhaviN!
Fixes #3820
You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments.
If logging-not-lazy is disabled then you can use % formatting as normal.