From 3d0b7e49c7cadc849b3d165443e16923ae33309f Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Wed, 25 Mar 2020 13:52:40 +0100 Subject: [PATCH] PEP fixes --- .flake8 | 2 +- pype/ftrack/lib/ftrack_app_handler.py | 7 +++---- pype/plugins/unreal/load/load_staticmeshfbx.py | 4 ++-- pype/unreal/lib.py | 10 +++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.flake8 b/.flake8 index b04062ceab..f9c81de232 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] # ignore = D203 -ignore = BLK100, W504 +ignore = BLK100, W504, W503 max-line-length = 79 exclude = .git, diff --git a/pype/ftrack/lib/ftrack_app_handler.py b/pype/ftrack/lib/ftrack_app_handler.py index 58c550b3dd..b5576ae046 100644 --- a/pype/ftrack/lib/ftrack_app_handler.py +++ b/pype/ftrack/lib/ftrack_app_handler.py @@ -277,7 +277,7 @@ class AppAction(BaseHandler): 'success': False, 'message': "Hook didn't finish successfully {0}" .format(self.label) - } + } if sys.platform == "win32": @@ -290,7 +290,7 @@ class AppAction(BaseHandler): # Run SW if was found executable if execfile is not None: - popen = avalonlib.launch( + avalonlib.launch( executable=execfile, args=[], environment=env ) else: @@ -298,8 +298,7 @@ class AppAction(BaseHandler): 'success': False, 'message': "We didn't found launcher for {0}" .format(self.label) - } - pass + } if sys.platform.startswith('linux'): execfile = os.path.join(path.strip('"'), self.executable) diff --git a/pype/plugins/unreal/load/load_staticmeshfbx.py b/pype/plugins/unreal/load/load_staticmeshfbx.py index 61e765f7c2..4c27f9aa92 100644 --- a/pype/plugins/unreal/load/load_staticmeshfbx.py +++ b/pype/plugins/unreal/load/load_staticmeshfbx.py @@ -37,7 +37,7 @@ class StaticMeshFBXLoader(api.Loader): tools = unreal.AssetToolsHelpers().get_asset_tools() temp_dir, temp_name = tools.create_unique_asset_name( - "/Game/{}".format(name), "_TMP" + "/Game/{}".format(name), "_TMP" ) unreal.EditorAssetLibrary.make_directory(temp_dir) @@ -95,7 +95,7 @@ class StaticMeshFBXLoader(api.Loader): container["objectName"]) # update metadata avalon_unreal.imprint( - container_path, {"_id": str(representation["_id"])}) + container_path, {"_id": str(representation["_id"])}) def remove(self, container): unreal.EditorAssetLibrary.delete_directory(container["namespace"]) diff --git a/pype/unreal/lib.py b/pype/unreal/lib.py index 8f87fdbf4e..0b049c8b1d 100644 --- a/pype/unreal/lib.py +++ b/pype/unreal/lib.py @@ -214,11 +214,11 @@ def create_unreal_project(project_name: str, # sources at start data["Modules"] = [{ - "Name": project_name, - "Type": "Runtime", - "LoadingPhase": "Default", - "AdditionalDependencies": ["Engine"], - }] + "Name": project_name, + "Type": "Runtime", + "LoadingPhase": "Default", + "AdditionalDependencies": ["Engine"], + }] if preset["install_unreal_python_engine"]: # now we need to fix python path in: