Skip to content

Commit bd97c3d

Browse files
SG-43664 Drop Python 3.7 support (#146)
Set minimum_python_version to 3.9 and modernise super() calls. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fe5e5b9 commit bd97c3d

6 files changed

Lines changed: 9 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 26.1.0
36+
rev: 26.5.1
3737
hooks:
3838
- id: black
3939
language_version: python3

info.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ description: "Locate published files and reference them into your scene."
158158
requires_shotgun_version:
159159
requires_core_version: "v0.19.1"
160160
requires_engine_version:
161+
minimum_python_version: "3.9"
161162

162163
# The documentation url for this item
163164
documentation_url: "https://help.autodesk.com/view/SGDEV/ENU/?guid=SG_Supervisor_Artist_sa_integrations_sa_integrations_user_guide_html#the-loader"

python/tk_multi_loader/banner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, parent):
2828
"""
2929
:param parent: Parent widget.
3030
"""
31-
super(Banner, self).__init__(parent)
31+
super().__init__(parent)
3232

3333
# Sets the style sheet for the widget.
3434
self.setStyleSheet(

python/tk_multi_loader/model_publishtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def hard_refresh(self):
220220
"""
221221
Clears any caches on disk, then refreshes the data.
222222
"""
223-
super(SgPublishTypeModel, self).hard_refresh()
223+
super().hard_refresh()
224224
self._load_external_data()
225225

226226
############################################################################################

python/tk_multi_loader/proxymodel_latestpublish.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SgLatestPublishProxyModel(FilterItemProxyModel):
2626
filter_changed = QtCore.Signal()
2727

2828
def __init__(self, parent):
29-
super(SgLatestPublishProxyModel, self).__init__(parent)
29+
super().__init__(parent)
3030
self._valid_type_ids = None
3131
self._show_folders = True
3232
self._search_filter = ""
@@ -73,9 +73,7 @@ def filterAcceptsRow(self, source_row, source_parent_idx):
7373
model and see if we should let it pass or not.
7474
"""
7575

76-
base_model_accepts = super(SgLatestPublishProxyModel, self).filterAcceptsRow(
77-
source_row, source_parent_idx
78-
)
76+
base_model_accepts = super().filterAcceptsRow(source_row, source_parent_idx)
7977
if not base_model_accepts:
8078
return False
8179

tests/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
os.environ["LOADER2_API_TEST"] = "api_test"
2727

2828
# First call the parent TankTestBase constructor to set up the tests base
29-
super(AppTestBase, self).setUp()
29+
super().setUp()
3030
self.setup_fixtures()
3131

3232
# get useful tank setting
@@ -96,7 +96,7 @@ def tearDown(self):
9696
cur_engine.destroy()
9797

9898
# important to call base class so it can clean up memory
99-
super(AppTestBase, self).tearDown()
99+
super().tearDown()
100100

101101

102102
class TestApi(AppTestBase):
@@ -111,7 +111,7 @@ def setUp(self):
111111
Set up before any tests are executed.
112112
"""
113113

114-
super(TestApi, self).setUp()
114+
super().setUp()
115115

116116
# setup published file types
117117
self.published_file_type1 = {

0 commit comments

Comments
 (0)