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

View file

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

View file

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