-
Notifications
You must be signed in to change notification settings - Fork 79
2022.07 #3206
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
2022.07 #3206
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.
Everything else looks good. One possible change and one request for clarification.
qiita_db/processing_job.py
Outdated
self.command.name, self.id)) | ||
message = ('New status: %s' % (new_status)) | ||
qdb.util.send_email(self.user.email, subject, message) | ||
if value not in ('waiting'): |
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.
since there's only one value, shouldn't it be if value != 'waiting'? Also, without a ',' this will come back as type str, according to the interpreter.
ignore_commands = ('Validate', 'complete_job', | ||
'release_validators') | ||
if self.command.name not in ignore_commands: | ||
subject = 'Job status change: %s (%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.
I like to use %s myself when I have the choice. Just want to confirm that it's okay to use %s and not f'{}' in new code.
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.
Agreed this is a matter of preference and what works well for placating flake8.
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.
Approved!
No description provided.