-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add a find_work_files hook for perforce work flows #73
base: master
Are you sure you want to change the base?
Conversation
environment.work_template, | ||
publish_items = self._process_publish_files(sg_publishes, | ||
environment.publish_template, | ||
environment.work_template, |
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.
continuation line under-indented for visual indent
environment.publish_template, | ||
environment.work_template, | ||
publish_items = self._process_publish_files(sg_publishes, | ||
environment.publish_template, |
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.
continuation line under-indented for visual indent
environment.valid_file_extensions) | ||
return {"sg_publishes":filtered_publishes} | ||
return {"sg_publishes":filtered_publishes} |
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.
missing whitespace after ':'
@@ -371,7 +371,7 @@ def _process_publish_files(self, sg_publishes, publish_template, work_template, | |||
# add new file item for this publish. Note that we also keep track of the | |||
# work path even though we don't know if this publish has a corresponding | |||
# work file. | |||
files[(file_key, file_details["version"])] = {"key":file_key, | |||
files[(file_key, file_details["version"])] = {"key":file_key, |
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.
missing whitespace after ':'
publish_template, | ||
work_template, | ||
context, | ||
name_map, |
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.
continuation line under-indented for visual indent
work_template, | ||
context, | ||
name_map, | ||
version_compare_ignore_fields, |
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.
continuation line under-indented for visual indent
work_file_item_details = self._process_work_files(filtered_work_files, | ||
work_template, | ||
context, | ||
name_map, |
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.
continuation line under-indented for visual indent
version_compare_ignore_fields, | ||
work_file_item_details = self._process_work_files(filtered_work_files, | ||
work_template, | ||
context, |
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.
continuation line under-indented for visual indent
name_map, | ||
version_compare_ignore_fields, | ||
work_file_item_details = self._process_work_files(filtered_work_files, | ||
work_template, |
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.
continuation line under-indented for visual indent
and pre_v_str[-1] in delims_str | ||
|
||
if (pre_v_str and post_v_str | ||
and pre_v_str[-1] in delims_str |
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.
line break before binary operator
hooks/find_work_files.py
Outdated
HookClass = sgtk.get_hook_baseclass() | ||
|
||
|
||
class FilterWorkFiles(HookClass): |
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.
class should be named FindWorkFiles.
hooks/find_work_files.py
Outdated
|
||
class FilterWorkFiles(HookClass): | ||
""" | ||
Hook that can be used to filter the list of work files found by the app for the current |
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.
Description should be updated.
aren't synced on the users machine yet. | ||
""" | ||
|
||
def execute(self, work_files_paths, work_template, work_fields, skip_fields, skip_missing_optional_keys=True, **kwargs): |
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.
Black would make changes.
Add a hook to allow finding additional workfiles.
This is handy in a perforce setup where all the workfiles might not have been synced to the users machine when it runs the _find_workfiles method.