Skip to content

Commit 4386027

Browse files
author
Andrey Cheptsov
committed
Fix CI lint failure in VastAI backend changes.
Made-with: Cursor
1 parent bbd32e9 commit 4386027

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/dstack/_internal/core/backends/vastai/compute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, config: VastAIConfig):
5151
"verified": {"eq": True},
5252
"cuda_max_good": {"gte": 12.8},
5353
"compute_cap": {"gte": 600},
54-
}
54+
},
5555
)
5656
)
5757

src/tests/_internal/core/backends/vastai/test_compute.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ def _config(community_cloud=None) -> VastAIConfig:
99

1010

1111
def test_vastai_compute_enables_community_cloud_by_default():
12-
with patch(
13-
"dstack._internal.core.backends.vastai.compute.VastAIProvider"
14-
) as vast_provider_cls, patch(
15-
"dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
16-
) as catalog_cls:
12+
with (
13+
patch("dstack._internal.core.backends.vastai.compute.VastAIProvider") as vast_provider_cls,
14+
patch("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog") as catalog_cls,
15+
):
1716
catalog_instance = catalog_cls.return_value
1817
VastAICompute(_config())
1918
vast_provider_cls.assert_called_once()
@@ -22,11 +21,10 @@ def test_vastai_compute_enables_community_cloud_by_default():
2221

2322

2423
def test_vastai_compute_can_enable_community_cloud():
25-
with patch(
26-
"dstack._internal.core.backends.vastai.compute.VastAIProvider"
27-
) as vast_provider_cls, patch(
28-
"dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
29-
) as catalog_cls:
24+
with (
25+
patch("dstack._internal.core.backends.vastai.compute.VastAIProvider") as vast_provider_cls,
26+
patch("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog") as catalog_cls,
27+
):
3028
catalog_instance = catalog_cls.return_value
3129
VastAICompute(_config(community_cloud=True))
3230
vast_provider_cls.assert_called_once()
@@ -35,11 +33,10 @@ def test_vastai_compute_can_enable_community_cloud():
3533

3634

3735
def test_vastai_compute_can_disable_community_cloud():
38-
with patch(
39-
"dstack._internal.core.backends.vastai.compute.VastAIProvider"
40-
) as vast_provider_cls, patch(
41-
"dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
42-
) as catalog_cls:
36+
with (
37+
patch("dstack._internal.core.backends.vastai.compute.VastAIProvider") as vast_provider_cls,
38+
patch("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog") as catalog_cls,
39+
):
4340
catalog_instance = catalog_cls.return_value
4441
VastAICompute(_config(community_cloud=False))
4542
vast_provider_cls.assert_called_once()

0 commit comments

Comments
 (0)