Skip to content

Commit aa83afb

Browse files
committed
Lint after launch type removal
1 parent 645f11b commit aa83afb

2 files changed

Lines changed: 8 additions & 24 deletions

File tree

cloudendure/cloudendure.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def get_project_id(self, project_name: str = "") -> str:
9292
print("Project Name does not exist!")
9393
return ""
9494

95-
def check(
96-
self, project_name: str = "", dry_run: bool = False
97-
) -> bool:
95+
def check(self, project_name: str = "", dry_run: bool = False) -> bool:
9896
"""Check the status of machines in the provided project."""
9997
if not project_name:
10098
project_name: str = self.project_name
@@ -105,9 +103,7 @@ def check(
105103
if not project_id:
106104
return False
107105

108-
print(
109-
f"Checking Project - Name: ({project_name}) - Dry Run: ({dry_run})"
110-
)
106+
print(f"Checking Project - Name: ({project_name}) - Dry Run: ({dry_run})")
111107
projects_response: Response = self.api.api_call("projects")
112108

113109
if projects_response.status_code != 200:
@@ -298,9 +294,7 @@ def update_blueprint(self, project_name: str = "", dry_run: bool = False) -> boo
298294
return False
299295
return True
300296

301-
def launch(
302-
self, project_name="", dry_run=False
303-
) -> Dict[str, Any]:
297+
def launch(self, project_name="", dry_run=False) -> Dict[str, Any]:
304298
"""Launch the test target instances."""
305299
response_dict: Dict[str, Any] = {}
306300
if not project_name:
@@ -312,9 +306,7 @@ def launch(
312306
if not project_id:
313307
return response_dict
314308

315-
print(
316-
f"Launching Project - Project ID: ({project_id}) - Dry Run: ({dry_run})",
317-
)
309+
print(f"Launching Project - Project ID: ({project_id}) - Dry Run: ({dry_run})")
318310
if dry_run:
319311
print("This is a dry run! Not launching any machines!")
320312
return response_dict
@@ -377,9 +369,7 @@ def launch(
377369
)
378370
return response_dict
379371

380-
def status(
381-
self, project_name: str = "", dry_run: bool = False
382-
) -> bool:
372+
def status(self, project_name: str = "", dry_run: bool = False) -> bool:
383373
"""Get the status of machines in the current wave."""
384374
if not project_name:
385375
project_name: str = self.project_name
@@ -465,9 +455,7 @@ def status(
465455
print("ERROR: some machines in the targeted pool are not ready")
466456
return False
467457

468-
def execute(
469-
self, project_name: str = "", dry_run: bool = False
470-
) -> bool:
458+
def execute(self, project_name: str = "", dry_run: bool = False) -> bool:
471459
"""Start the migration project my checking and launching the migration wave."""
472460
if not project_name:
473461
project_name: str = self.project_name
@@ -478,9 +466,7 @@ def execute(
478466
if not project_id:
479467
return False
480468

481-
print(
482-
f"Executing Project - Name: ({project_name}) - Dry Run: ({dry_run})"
483-
)
469+
print(f"Executing Project - Name: ({project_name}) - Dry Run: ({dry_run})")
484470

485471
projects_result: Response = self.api.api_call("projects")
486472
if projects_result.status_code != 200:

cloudendure/events.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ class Event:
4848
# Successful Event Types
4949
EVENT_SUCCESSFULLY_LAUNCHED: Tuple[str, str] = ("SUCCESSFULLY_LAUNCHED", "SL")
5050

51-
SUCCESSFUL_EVENT_TYPES: List[Tuple[str, str]] = [
52-
EVENT_SUCCESSFULLY_LAUNCHED,
53-
]
51+
SUCCESSFUL_EVENT_TYPES: List[Tuple[str, str]] = [EVENT_SUCCESSFULLY_LAUNCHED]
5452

5553
# Warned Event Types
5654
EVENT_IGNORED: Tuple[str, str] = ("IGNORED", "EI")

0 commit comments

Comments
 (0)