Skip to content

Commit fd1f0a4

Browse files
authored
Merge pull request #6 from GPLgithub/master
Fixes and polish
2 parents bce9ad4 + 7a3feb0 commit fd1f0a4

File tree

8 files changed

+170
-65
lines changed

8 files changed

+170
-65
lines changed

.flake8

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2018 GPL Solutions, LLC. All rights reserved.
2+
#
3+
# Use of this software is subject to the terms of the GPL Solutions license
4+
# agreement provided at the time of installation or download, or which otherwise
5+
# accompanies this software in either electronic or hard copy form.
6+
#
7+
8+
# Flake 8 PEP and lint configuration - https://gitlab.com/pycqa/flake8
9+
#
10+
# This defines the official lint and PEP8 rules for this repository
11+
#
12+
# You can run this locally by doing pep install flake8 and then
13+
# >flake8 .
14+
15+
[flake8]
16+
17+
# Things we don't want to lint
18+
exclude =
19+
.tox,
20+
.git,
21+
.flake8,
22+
.gitignore,
23+
.travis.yml,
24+
.cache,
25+
.eggs,
26+
*.rst,
27+
*.yml,
28+
*.pyc,
29+
*.pyo,
30+
*.egg-info,
31+
__pycache__,
32+
# Those are our third parties, do not lint them
33+
vendors,
34+
# Skip __init__.py files, to not have a lot of 'xxx' imported but unused
35+
python/__init__.py,
36+
python/*/__init__.py,
37+
# Skip the auto-generated ui file.
38+
python/*/ui,
39+
venv,
40+
winenv,
41+
osx_env,
42+
win_env,
43+
44+
# Ignore some errors
45+
#
46+
# E402 module level import not at top of file
47+
# E501 line too long (112 > 79 characters)
48+
# N802 Variables should be lower case. (clashes with Qt naming conventions)
49+
# N806 Variables should be lower case. (clashes with Qt naming conventions)
50+
# W503 line break before binary operator (it breaks before, not after)
51+
52+
ignore = E501, E402, N802, N806, W503
53+

framework.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is based on templates provided and copyrighted by Autodesk, Inc.
2-
# This file has been modified by Epic Games, Inc. and is subject to the license
2+
# This file has been modified by Epic Games, Inc. and is subject to the license
33
# file included in this repository.
44

55
"""
@@ -22,7 +22,7 @@ class UnrealQtFramework(sgtk.platform.Framework):
2222

2323
##########################################################################################
2424
# init and destroy
25-
25+
2626
def init_framework(self):
2727
"""
2828
This framework ships with additional Python packages and tweak the Python
@@ -35,7 +35,7 @@ def init_framework(self):
3535

3636
# Check if PySide is already available, do nothing if it is the case
3737
try:
38-
from sgtk.platform.qt import QtCore
38+
from sgtk.platform.qt import QtCore # noqa
3939
self.log_debug("Qt is already available, not activating any custom package.")
4040
return
4141
except ImportError as e:

hooks/core/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def populate_bundle_cache_entry(self, destination, descriptor, **kwargs):
142142
for asset in response_d["assets"]:
143143
name = asset["name"]
144144
m = re.match(
145-
"%s-py\d.\d-%s.zip" % (version, pname),
145+
r"%s-py\d.\d-%s.zip" % (version, pname),
146146
name
147147
)
148148
if m:

hooks/tk-multi-publish2/tk-maya/basic/collector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class MayaSessionCollectorWithSecondaries(HookBaseClass):
2121
collector: "{self}/collector.py:{engine}/tk-multi-publish2/basic/collector.py:{config}/tk-multi-publish2/tk-maya/basic/collector.py"
2222
"""
2323

24-
2524
def collect_current_maya_session(self, settings, parent_item):
2625
"""
2726
Creates an item that represents the current maya session.

hooks/tk-multi-publish2/tk-maya/basic/publish_fbx.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def validate(self, settings, item):
187187
:raises ValueError: For problems which can't be solved in the current session.
188188
"""
189189

190-
publisher = self.parent
191190
path = _session_path()
192191

193192
# ---- ensure the session has been saved
@@ -282,7 +281,6 @@ def validate(self, settings, item):
282281
# Set the publish_path to be explicit.
283282
item.local_properties["publish_path"] = publish_path
284283

285-
286284
# Set the session path on the item for use by the base plugin validation
287285
# step.
288286
# NOTE: this path could change prior to the publish phase.
@@ -312,8 +310,6 @@ def publish(self, settings, item):
312310
:param item: Item to process
313311
"""
314312

315-
publisher = self.parent
316-
317313
# Get the path in a normalized state. no trailing separator, separators
318314
# are appropriate for current os, no double separators, etc.
319315
path = sgtk.util.ShotgunPath.normalize(_session_path())
@@ -376,6 +372,7 @@ def _session_path():
376372

377373
return path
378374

375+
379376
def _save_session(path):
380377
"""
381378
Save the current session to the supplied path.

0 commit comments

Comments
 (0)