Skip to content

Commit 061f07d

Browse files
committed
reformat file
1 parent 8b62909 commit 061f07d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/integ/sagemaker/jumpstart/conftest.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _setup():
5252
hub = Hub(
5353
hub_name=os.environ[ENV_VAR_JUMPSTART_SDK_TEST_HUB_NAME], sagemaker_session=get_sm_session()
5454
)
55-
55+
5656
# Check if hub already exists before creating
5757
try:
5858
hub.describe()
@@ -161,16 +161,19 @@ def _cleanup_old_hubs(sagemaker_session):
161161
try:
162162
response = sagemaker_session.list_hubs()
163163
test_hubs = [
164-
hub for hub in response.get("HubSummaries", [])
164+
hub
165+
for hub in response.get("HubSummaries", [])
165166
if hub["HubName"].startswith(HUB_NAME_PREFIX)
166167
]
167-
168+
168169
# Sort by creation time and delete oldest hubs
169170
test_hubs.sort(key=lambda x: x.get("CreationTime", ""))
170-
171+
171172
# Delete oldest hubs (keep only the most recent 10)
172-
hubs_to_delete = test_hubs[:-10] if len(test_hubs) > 10 else test_hubs[:max(0, len(test_hubs) - 40)]
173-
173+
hubs_to_delete = (
174+
test_hubs[:-10] if len(test_hubs) > 10 else test_hubs[: max(0, len(test_hubs) - 40)]
175+
)
176+
174177
for hub in hubs_to_delete:
175178
try:
176179
print(f"Deleting old hub: {hub['HubName']}")

0 commit comments

Comments
 (0)