Skip to content

Commit

Permalink
Merge pull request #116 from ynput/enhancement/cleanup-code-for-ruff
Browse files Browse the repository at this point in the history
Chore: Cleanup code for ruff
  • Loading branch information
iLLiCiTiT authored Jul 25, 2024
2 parents 31cfc5f + 25444a3 commit 8819470
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import functools

import ftrack_api
Expand Down
2 changes: 0 additions & 2 deletions client/ayon_ftrack/event_handlers_user/action_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

from ayon_core.addon import AddonsManager
from ayon_ftrack.common import (
CUST_ATTR_KEY_SERVER_PATH,
is_ftrack_enabled_in_settings,
get_folder_path_for_entities,
BaseAction,
)
from ayon_applications import (
ApplicationManager,
ApplicationLaunchFailed,
ApplicationExecutableNotFound,
)
Expand Down
2 changes: 2 additions & 0 deletions client/ayon_ftrack/ftrack_addon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os

import ayon_api

from ayon_core.addon import (
AYONAddon,
ITrayAddon,
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_ftrack/launch_hooks/post_ftrack_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def ftrack_status_change(self, session, entity, project_name):
[ent["name"] for ent in entity["link"]]
)

statuses = session.query(f"select id, name from Status").all()
statuses = session.query("select id, name from Status").all()
statuses_by_low_name = {
status["name"].lower(): status
for status in statuses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def is_valid_instance(self, context, instance):
task_entity = instance.data.get("ftrackTask")
if not task_entity:
self.log.debug(
"Skipping instance Does not have filled task".format(
"Skipping instance {}. Does not have filled task".format(
instance.data["productName"]))
return False

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_ftrack/tray/user_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def run(self):

self._handle_data(connection, data)

except Exception as exc:
except Exception:
self.log.error(
"Event server process failed", exc_info=True
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def _get_rename_project_items(
)
if repeated:
intro_message = (
f"Entered values are <b>not valid</b>.<br/><br/>"
"Entered values are <b>not valid</b>.<br/><br/>"
) + intro_message

items = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import collections

import ayon_api

from ftrack_common import BaseEventHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ def _propagate_task_type_changes(self, task_type_changes):
if entity.task_type == new_type_name:
continue

if not new_type_name in task_types_names:
if new_type_name not in task_types_names:
project_need_update = True

to_change.append((entity, new_type_name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,6 @@ def process_moved(self):
continue

new_parent_id = ent_info["changes"]["parent_id"]["new"]
old_parent_id = ent_info["changes"]["parent_id"]["old"]

mongo_id = avalon_ent["_id"]
if self.changeability_by_mongo_id[mongo_id]:
Expand Down

0 comments on commit 8819470

Please sign in to comment.