hound(nuke): pep8 suggestions

This commit is contained in:
Jakub Jezek 2021-01-19 17:36:44 +01:00
parent fe8c9546db
commit 0911787fdb
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
4 changed files with 15 additions and 18 deletions

View file

@ -1,7 +1,5 @@
import os
import sys
import logging
import nuke
from avalon import api as avalon
@ -53,6 +51,7 @@ def reload_config():
try:
importlib.reload(module)
except AttributeError as e:
from importlib import reload
log.warning("Cannot reload module: {}".format(e))
reload(module)

View file

@ -91,7 +91,7 @@ class CreateWritePrerender(plugin.PypeCreator):
write_data.update({
"fpath_template": ("{work}/prerenders/nuke/{subset}"
"/{subset}.{frame}.{ext}")})
self.log.info("write_data: {}".format(write_data))
write_node = lib.create_write_node(

View file

@ -1,4 +1,3 @@
import re
import nuke
import contextlib
@ -9,7 +8,6 @@ from pype.hosts.nuke.api.lib import (
)
@contextlib.contextmanager
def preserve_trim(node):
"""Preserve the relative trim of the Loader tool.
@ -77,16 +75,17 @@ def add_review_presets_config():
"representations": list()
}
settings = get_current_project_settings()
review_profiles = (settings["global"]
["publish"]
["ExtractReview"]
["profiles"]
)
review_profiles = (
settings["global"]
["publish"]
["ExtractReview"]
["profiles"]
)
outputs = {}
for profile in review_profiles:
outputs.update(profile.get("outputs", {}))
for output, properities in outputs.items():
returning["representations"].append(output)
returning["families"] += properities.get("families", [])
@ -277,10 +276,11 @@ class LoadMov(api.Loader):
colorspace = version_data.get("colorspace")
if first is None:
self.log.warning("Missing start frame for updated version"
"assuming starts at frame 0 for: "
"{} ({})".format(
node['name'].value(), representation))
self.log.warning((
"Missing start frame for updated version"
"assuming starts at frame 0 for: "
"{} ({})").format(
node['name'].value(), representation))
first = 0
# fix handle start and end if none are available
@ -313,7 +313,7 @@ class LoadMov(api.Loader):
preset_clrsp = get_imageio_input_colorspace(file)
if preset_clrsp is not None:
r["colorspace"].setValue(preset_clrsp)
node["colorspace"].setValue(preset_clrsp)
updated_dict = {}
updated_dict.update({

View file

@ -1,5 +1,3 @@
import re
import os
import nuke
import contextlib