From fff3c15da0a845443e040f9eef17235ebbb0bf8e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 10 Jul 2020 17:19:48 +0200 Subject: [PATCH] formatting changes --- pype/modules/ftrack/events/event_sync_to_avalon.py | 4 +++- pype/modules/ftrack/lib/__init__.py | 4 ++-- pype/modules/ftrack/lib/avalon_sync.py | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pype/modules/ftrack/events/event_sync_to_avalon.py b/pype/modules/ftrack/events/event_sync_to_avalon.py index 739ec69522..a73c198997 100644 --- a/pype/modules/ftrack/events/event_sync_to_avalon.py +++ b/pype/modules/ftrack/events/event_sync_to_avalon.py @@ -1166,7 +1166,9 @@ class SyncToAvalonEvent(BaseEvent): self.process_session.rolback() # TODO logging # TODO report - error_msg = "Failed to store MongoID to entity's custom attribute" + error_msg = ( + "Failed to store MongoID to entity's custom attribute" + ) report_msg = ( "{}||SyncToAvalon action may solve this issue" ).format(error_msg) diff --git a/pype/modules/ftrack/lib/__init__.py b/pype/modules/ftrack/lib/__init__.py index df546ab725..d8e9c7a11c 100644 --- a/pype/modules/ftrack/lib/__init__.py +++ b/pype/modules/ftrack/lib/__init__.py @@ -5,7 +5,7 @@ from .ftrack_event_handler import BaseEvent from .ftrack_action_handler import BaseAction, statics_icon from .ftrack_app_handler import AppAction -__all__ = [ +__all__ = ( "avalon_sync", "credentials", "BaseHandler", @@ -13,4 +13,4 @@ __all__ = [ "BaseAction", "statics_icon", "AppAction" -] +) diff --git a/pype/modules/ftrack/lib/avalon_sync.py b/pype/modules/ftrack/lib/avalon_sync.py index db0d2e7836..b3e04efdc3 100644 --- a/pype/modules/ftrack/lib/avalon_sync.py +++ b/pype/modules/ftrack/lib/avalon_sync.py @@ -62,10 +62,11 @@ def check_regex(name, entity_type, in_schema=None, schema_patterns=None): if not schema_obj: name_pattern = default_pattern else: - name_pattern = schema_obj.get( - "properties", {}).get( - "name", {}).get( - "pattern", default_pattern + name_pattern = ( + schema_obj + .get("properties", {}) + .get("name", {}) + .get("pattern", default_pattern) ) if schema_patterns is not None: schema_patterns[schema_name] = name_pattern