Skip to content

Commit f5cc9e1

Browse files
authored
SG-40910 Update Pre-commit/Black (#133)
1 parent 9964ea2 commit f5cc9e1

16 files changed

Lines changed: 27 additions & 29 deletions

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exclude: "ui\/.*py$"
1414
# List of super useful formatters.
1515
repos:
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
17-
rev: v5.0.0
17+
rev: v6.0.0
1818
hooks:
1919
# Ensures the code is syntaxically correct
2020
- id: check-ast
@@ -33,7 +33,7 @@ repos:
3333
- id: trailing-whitespace
3434
# Leave black at the bottom so all touchups are done before it is run.
3535
- repo: https://github.com/psf/black
36-
rev: 25.1.0
36+
rev: 26.1.0
3737
hooks:
3838
- id: black
3939
language_version: python3

hooks/tk-3dsmaxplus_actions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import sgtk
1516
import os
1617
import MaxPlus
@@ -197,7 +198,7 @@ def _merge(self, path, sg_publish_data):
197198
if not os.path.exists(path):
198199
raise Exception("File not found on disk - '%s'" % path)
199200

200-
(_, ext) = os.path.splitext(path)
201+
_, ext = os.path.splitext(path)
201202

202203
supported_file_exts = [".max"]
203204
if ext.lower() not in supported_file_exts:
@@ -226,7 +227,7 @@ def _xref_scene(self, path, sg_publish_data):
226227
if not os.path.exists(path):
227228
raise Exception("File not found on disk - '%s'" % path)
228229

229-
(_, ext) = os.path.splitext(path)
230+
_, ext = os.path.splitext(path)
230231

231232
supported_file_exts = [".max"]
232233
if ext.lower() not in supported_file_exts:

hooks/tk-flame_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"""
1313
Hook that loads defines all the available actions, broken down by publish type.
1414
"""
15+
1516
import collections
1617
import os
1718
import re

hooks/tk-houdini_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import os
1516
import re
1617
import sgtk

hooks/tk-mari_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import sgtk
1516
from sgtk import TankError
1617
import os

hooks/tk-maya_actions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ def _create_image_plane(self, path, sg_publish_data):
311311
return
312312

313313
# create an image plane for the supplied path, visible in all views
314-
(img_plane, img_plane_shape) = cmds.imagePlane(
315-
fileName=path, showInAllViews=True
316-
)
314+
img_plane, img_plane_shape = cmds.imagePlane(fileName=path, showInAllViews=True)
317315
app.logger.debug("Created image plane %s with path %s" % (img_plane, path))
318316

319317
if has_frame_spec:

hooks/tk-motionbuilder_actions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import sgtk
1516
from pyfbsdk import FBApplication
1617
import os
@@ -148,7 +149,7 @@ def _import(self, path, sg_publish_data):
148149
if not os.path.exists(path):
149150
raise Exception("File not found on disk - '%s'" % path)
150151

151-
(_, ext) = os.path.splitext(path)
152+
_, ext = os.path.splitext(path)
152153

153154
if ext.lower() != ".fbx":
154155
raise Exception(

hooks/tk-nuke_actions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import os
1516
import re
1617
import glob
@@ -256,7 +257,7 @@ def _create_read_node(self, path, sg_publish_data):
256257
"""
257258
import nuke
258259

259-
(_, ext) = os.path.splitext(path)
260+
_, ext = os.path.splitext(path)
260261

261262
# If this is an Alembic cache, use a ReadGeo2 and we're done.
262263
if ext.lower() == ".abc":

hooks/tk-photoshop_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import sgtk
1516
import os
1617
from sgtk.platform.qt import QtGui

hooks/tk-shell_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Hook that loads defines all the available actions, broken down by publish type.
1313
"""
14+
1415
import pprint
1516
import sgtk
1617

0 commit comments

Comments
 (0)