Skip to content

Commit 9205c97

Browse files
committed
address depr
1 parent 6b7da53 commit 9205c97

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

scalr/cloud/__init__.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
from abc import ABC, abstractclassmethod
1+
from abc import ABC
22
from dataclasses import dataclass
33
from typing import List, Optional
44

5-
from scalr.config import CloudConfig, ScaleDownSelectionEnum
6-
from scalr.log import log
7-
85

96
@dataclass
107
class CloudInstance(ABC):
@@ -27,19 +24,19 @@ def configure(self, launch: dict, filter: Optional[str] = None) -> None:
2724
self.launch = launch
2825
self.filter = filter
2926

30-
@abstractclassmethod
31-
def get_current_instances(self) -> List[CloudInstance]:
27+
@classmethod
28+
def get_current_instances(cls) -> List[CloudInstance]:
3229
"""Returns a list of a represation an instance."""
3330
return list()
3431

35-
@abstractclassmethod
36-
def ensure_instances_running(self):
32+
@classmethod
33+
def ensure_instances_running(cls):
3734
"""Ensure affected instances are running."""
3835

39-
@abstractclassmethod
40-
def deploy_instance(self, name: str):
36+
@classmethod
37+
def deploy_instance(cls, name: str):
4138
"""Deploys an instance using launch config with a filter added."""
4239

43-
@abstractclassmethod
44-
def destroy_instance(self, instance: CloudInstance):
40+
@classmethod
41+
def destroy_instance(cls, instance: CloudInstance):
4542
"""Destroys an instance based on a strategy"""

0 commit comments

Comments
 (0)