fix(lint): remove duplicate ImportError clauses and reformat files
Remove duplicate except ImportError blocks in cloud_resources_steps.py (B025 violations in step_sandbox_create, step_sandbox_commit, step_sandbox_rollback). Apply ruff format to 5 files flagged by the format check.
This commit is contained in:
@@ -276,12 +276,6 @@ def step_sandbox_create(context: Any) -> None:
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
|
||||
|
||||
@when("I call commit on the sandbox strategy")
|
||||
@@ -298,12 +292,6 @@ def step_sandbox_commit(context: Any) -> None:
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
|
||||
|
||||
@when("I call rollback on the sandbox strategy")
|
||||
@@ -320,12 +308,6 @@ def step_sandbox_rollback(context: Any) -> None:
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
except ImportError as exc:
|
||||
context.handler_error = exc # type: ignore[attr-defined]
|
||||
context.handler_error_type = "ImportError" # type: ignore[attr-defined]
|
||||
|
||||
|
||||
@when("I validate the cloud sandbox strategy")
|
||||
|
||||
Reference in New Issue
Block a user