Skip to content

Commit

Permalink
Merge pull request #394 from ynput/enhancement/small-code-cleanup
Browse files Browse the repository at this point in the history
Chore: Small code cleanup
  • Loading branch information
iLLiCiTiT authored Apr 11, 2024
2 parents b965f75 + 6366998 commit 95b4d64
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@


__all__ = (
"APPLICATIONS_ADDON_ROOT",
"DEFAULT_ENV_SUBGROUP",
"PLATFORM_NAMES",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def _get_clip_instances(
):
continue

instance = self._make_product_instance(
self._make_product_instance(
otio_clip,
product_type_preset,
deepcopy(base_instance_data),
Expand Down
4 changes: 3 additions & 1 deletion client/ayon_core/hosts/unreal/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
)

__all__ = [
"UnrealActorCreator",
"UnrealAssetCreator",
"Loader",
"install",
"uninstall",
"Loader",
"ls",
"publish",
"containerise",
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/modules/loader_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def tray_init(self):
# Add library tool
self._loader_imported = False
try:
from ayon_core.tools.loader.ui import LoaderWindow
from ayon_core.tools.loader.ui import LoaderWindow # noqa F401

self._loader_imported = True
except Exception:
Expand Down
14 changes: 0 additions & 14 deletions client/ayon_core/scripts/slates/slate_base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,6 @@ def fill_data(self):
def main_style(self):
return load_default_style()

def height(self):
raise NotImplementedError(
"Attribute `height` is not implemented for <{}>".format(
self.__clas__.__name__
)
)

def width(self):
raise NotImplementedError(
"Attribute `width` is not implemented for <{}>".format(
self.__clas__.__name__
)
)

def collect_data(self):
return None

Expand Down
5 changes: 3 additions & 2 deletions client/ayon_core/tools/publisher/control_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ def _get_instance_changes_for_client(self):

@abstractmethod
def _send_instance_changes_to_client(self):
instance_changes = self._get_instance_changes_for_client()
# Implement to send 'instance_changes' value to client
# TODO Implement to send 'instance_changes' value to client
# instance_changes = self._get_instance_changes_for_client()
pass

@abstractmethod
def save_changes(self):
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/tools/tray/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def _create_splash(self):
def main():
app = get_ayon_qt_app()

starter = TrayStarter(app)
starter = TrayStarter(app) # noqa F841

if not is_running_from_build() and os.name == "nt":
import ctypes
Expand Down
8 changes: 4 additions & 4 deletions client/ayon_core/tools/utils/color_widgets/color_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,11 @@ def color_changed(self):
return

self._block_changes = True
h, s, l, _ = self.color.getHsl()
hue, sat, lum, _ = self.color.getHsl()

self.input_hue.setValue(h)
self.input_sat.setValue(s)
self.input_light.setValue(l)
self.input_hue.setValue(hue)
self.input_sat.setValue(sat)
self.input_light.setValue(lum)

self._block_changes = False

Expand Down
3 changes: 2 additions & 1 deletion client/ayon_core/tools/utils/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ def createWidget(self, parent):
def set_option_tip(self, options):
sep = "\n\n"
if not options or not isinstance(options[0], AbstractAttrDef):
mak = (lambda opt: opt["name"] + " :\n " + opt["help"])
def mak(opt):
return opt["name"] + " :\n " + opt["help"]
self.option_tip = sep.join(mak(opt) for opt in options)
return

Expand Down

0 comments on commit 95b4d64

Please sign in to comment.