-
Notifications
You must be signed in to change notification settings - Fork 1.3k
logger: use lazy formatting #7961
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
Conversation
dvc/repo/experiments/push.py
Outdated
|
|
||
| refspec_list = [f"{exp_ref}:{exp_ref}" for exp_ref in refs] | ||
| logger.debug(f"git push experiment '{refs}' -> '{git_remote}'") | ||
| logger.debug("git push experiment %r -> '%s'", refspec_list, git_remote) |
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.
Here I've changed refs to refspec_list to match pull.py just above.
β¦ogs, especially in windows paths
|
|
||
| def _log_missing(self, status: "CompareStatusResult"): | ||
| if status.missing: | ||
| if status.missing and logger.isEnabledFor(logging.WARNING): |
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.
hm, could you explain the reasoning behind this change, please? Seems unrelated to the rest.
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.
There's a logger.warning in the block, and the costly part of the message formatting can't simply be converted to %s.
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.
@alexmojaki That seems unnecessary though. I'll adjust it back for now
efiop
left a comment
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!
Fixes #1843
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.