-
Notifications
You must be signed in to change notification settings - Fork 206
For #46904, site wide tk-config-default2 #172
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
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.
minor nitpicky comments about formatting and commented out code.
shotgun_api3/lib/mockgun/mockgun.py
Outdated
|
||
def find( | ||
self, | ||
entity_type, filters, fields=None, |
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 formatting seems a bit arbitrary. Any reason it's done this way?
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.
First line is self, next three is the most common-only used params to the method and then the rest. Should I simply break them on two lines? One arg per line seems wasteful to me.
shotgun_api3/lib/mockgun/mockgun.py
Outdated
results = self.find(entity_type, filters, fields=fields, order=order, filter_operator=filter_operator, retired_only=retired_only) | ||
def find_one( | ||
self, | ||
entity_type, filters, fields=None, |
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.
same.
"%s.%s is of type entity, but data %s does not contain 'type' and 'id'" | ||
% (entity_type, field, item) | ||
) | ||
# elif item["type"] not in field_info["properties"]["valid_types"]["value"]: |
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.
any reason why this is commented out? maybe make a comment to say why it has been left in?
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.
Maybe it's not obvious from the diff, but it was already commented out. I only reformatted it because it was longer than 120 chars. Unfortunately we don't know why it was commented out...
While writing unit tests in Toolkit I stumbled upon this bug, where searching for a sub-entity field would crash if any of the sub-entity field was set to
None
. See unit test for more info.Also, PEP8ed
mockgun.py
. The actual fix is on line 679