Skip to content

Commit 1fb445e

Browse files
style: auto-format code with ruff [skip ci]
1 parent 1c05a05 commit 1fb445e

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/orb/infrastructure/adapters/asg_query_adapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ async def get_asg_details(self, asg_name: str) -> dict[str, Any]:
2424
groups = response.get("AutoScalingGroups", [])
2525
return groups[0] if groups else {}
2626
except ClientError as e:
27-
if e.response['Error']['Code'] in ('ValidationError',):
27+
if e.response["Error"]["Code"] in ("ValidationError",):
2828
return {}
29-
self._logger.warning('AWS API error querying ASG %s: %s', asg_name, e)
29+
self._logger.warning("AWS API error querying ASG %s: %s", asg_name, e)
3030
raise
3131
except Exception as e:
32-
self._logger.error('Unexpected error querying ASG %s: %s', asg_name, e)
32+
self._logger.error("Unexpected error querying ASG %s: %s", asg_name, e)
3333
raise

src/orb/infrastructure/storage/json/strategy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,10 @@ def _save_data(self, entity_data: dict[str, dict[str, Any]]) -> None:
356356
else:
357357
full_data = {}
358358
except Exception as e:
359-
self.logger.error('Cannot read existing storage file before save, aborting to prevent data loss: %s', e)
359+
self.logger.error(
360+
"Cannot read existing storage file before save, aborting to prevent data loss: %s",
361+
e,
362+
)
360363
raise
361364

362365
# Ensure full_data is a dictionary

src/orb/providers/aws/infrastructure/aws_handler_factory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def create_handler(self, handler_type: str) -> AWSHandler:
108108
config_port=config_port,
109109
)
110110
except Exception as e:
111-
self._logger.warning('AWSNativeSpecService unavailable, native spec enrichment disabled: %s', e)
111+
self._logger.warning(
112+
"AWSNativeSpecService unavailable, native spec enrichment disabled: %s", e
113+
)
112114

113115
machine_adapter = AWSMachineAdapter(
114116
aws_client=self._aws_client,

src/orb/providers/aws/infrastructure/handlers/asg/handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ def detect_asg_instances(aws_client, instance_ids: list[str]) -> dict[str, list[
305305
return asg_mapping
306306

307307
except Exception as e:
308-
logging.warning('Failed to detect ASG membership for instances, skipping capacity reduction: %s', e)
308+
logging.warning(
309+
"Failed to detect ASG membership for instances, skipping capacity reduction: %s", e
310+
)
309311
return {}
310312

311313
def reduce_capacity_for_instance_ids(self, instance_ids: list[str]) -> None:

0 commit comments

Comments
 (0)