Skip to content

Commit 7b5b9aa

Browse files
committed
chore: ruff lint + format pass
1 parent 12404aa commit 7b5b9aa

11 files changed

Lines changed: 64 additions & 23 deletions

src/orb/bootstrap/provider_services.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ def _register_provider_utility_services(container: DIContainer) -> None:
7373
for name in _REGISTERED_PROVIDERS:
7474
mod_path = f"orb.providers.{name}.registration"
7575
if importlib.util.find_spec(mod_path) is None:
76-
logger.debug(
77-
"%s provider not available, skipping utility service registration", name
78-
)
76+
logger.debug("%s provider not available, skipping utility service registration", name)
7977
continue
8078
try:
8179
mod = importlib.import_module(mod_path)

src/orb/domain/base/events/provider_events.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ class ProviderResourceStateChangedEvent(DomainEvent):
8585
def model_post_init(self, __context: Any) -> None:
8686
"""Initialize aggregate information after model creation."""
8787
object.__setattr__(self, "aggregate_id", self.resource_id)
88-
object.__setattr__(
89-
self, "aggregate_type", f"{self.provider_type}_{self.resource_type}"
90-
)
88+
object.__setattr__(self, "aggregate_type", f"{self.provider_type}_{self.resource_type}")
9189
super().model_post_init(__context)
9290
if not self.resource_type:
9391
raise ValueError("Resource type cannot be empty")

src/orb/providers/registration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def register_all_providers(container: "DIContainer | None" = None) -> None:
6969
# Deprecated aliases – kept for backward compatibility with existing callers.
7070
# ---------------------------------------------------------------------------
7171

72+
7273
def register_all_provider_types() -> None:
7374
"""Register all available provider types.
7475

tests/providers/aws/live/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from boto3 import Session
1818
from botocore.exceptions import ClientError, NoCredentialsError
1919

20+
2021
def _find_repo_root(start: Path) -> Path:
2122
"""Walk up from *start* until we find pyproject.toml. Hard-fail otherwise.
2223

tests/providers/aws/live/test_cleanup_e2e_onaws.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,15 @@ async def _cleanup() -> None:
390390
"Fixture teardown: cleanup_launch_templates failed for %s: %s", req_id, exc
391391
)
392392

393-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
394-
"HF_PROVIDER_WORKDIR", "DEFAULT_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR",
395-
"HF_LOGDIR"):
393+
for key in (
394+
"ORB_CONFIG_DIR",
395+
"HF_PROVIDER_CONFDIR",
396+
"HF_PROVIDER_LOGDIR",
397+
"HF_PROVIDER_WORKDIR",
398+
"DEFAULT_PROVIDER_WORKDIR",
399+
"AWS_PROVIDER_LOG_DIR",
400+
"HF_LOGDIR",
401+
):
396402
os.environ.pop(key, None)
397403

398404
try:

tests/providers/aws/live/test_mcp_onaws.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,15 @@ async def _cleanup() -> None:
184184
)
185185

186186
# Teardown: clean up env vars and reset DI container so next test gets a fresh one
187-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
188-
"HF_PROVIDER_WORKDIR", "DEFAULT_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR",
189-
"HF_LOGDIR"):
187+
for key in (
188+
"ORB_CONFIG_DIR",
189+
"HF_PROVIDER_CONFDIR",
190+
"HF_PROVIDER_LOGDIR",
191+
"HF_PROVIDER_WORKDIR",
192+
"DEFAULT_PROVIDER_WORKDIR",
193+
"AWS_PROVIDER_LOG_DIR",
194+
"HF_LOGDIR",
195+
):
190196
os.environ.pop(key, None)
191197

192198
try:

tests/providers/aws/live/test_multi_asg_termination.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,14 @@ def _tracking_request_machines(template_name: str, machine_count: int):
192192
except Exception as exc:
193193
log.warning("Fixture teardown: cleanup_tracked_requests failed: %s", exc)
194194

195-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
196-
"HF_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR", "HF_LOGDIR"):
195+
for key in (
196+
"ORB_CONFIG_DIR",
197+
"HF_PROVIDER_CONFDIR",
198+
"HF_PROVIDER_LOGDIR",
199+
"HF_PROVIDER_WORKDIR",
200+
"AWS_PROVIDER_LOG_DIR",
201+
"HF_LOGDIR",
202+
):
197203
os.environ.pop(key, None)
198204
processor.cleanup_test_templates(test_name)
199205
log.removeHandler(file_handler)

tests/providers/aws/live/test_multi_ec2_fleet_termination.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,14 @@ def _tracking_request_machines(template_name: str, machine_count: int):
209209
except Exception as exc:
210210
log.warning("Fixture teardown: cleanup_tracked_requests failed: %s", exc)
211211

212-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
213-
"HF_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR", "HF_LOGDIR"):
212+
for key in (
213+
"ORB_CONFIG_DIR",
214+
"HF_PROVIDER_CONFDIR",
215+
"HF_PROVIDER_LOGDIR",
216+
"HF_PROVIDER_WORKDIR",
217+
"AWS_PROVIDER_LOG_DIR",
218+
"HF_LOGDIR",
219+
):
214220
os.environ.pop(key, None)
215221
processor.cleanup_test_templates(test_name)
216222
log.removeHandler(file_handler)

tests/providers/aws/live/test_multi_resource_termination.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,14 @@ def _tracking_request_machines(template_name: str, machine_count: int):
223223
except Exception as exc:
224224
log.warning("Fixture teardown: cleanup_tracked_requests failed: %s", exc)
225225

226-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
227-
"HF_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR", "HF_LOGDIR"):
226+
for key in (
227+
"ORB_CONFIG_DIR",
228+
"HF_PROVIDER_CONFDIR",
229+
"HF_PROVIDER_LOGDIR",
230+
"HF_PROVIDER_WORKDIR",
231+
"AWS_PROVIDER_LOG_DIR",
232+
"HF_LOGDIR",
233+
):
228234
os.environ.pop(key, None)
229235
processor.cleanup_test_templates(test_name)
230236
log.removeHandler(file_handler)

tests/providers/aws/live/test_multi_spot_fleet_termination.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,14 @@ def _tracking_request_machines(template_name: str, machine_count: int):
211211
except Exception as exc:
212212
log.warning("Fixture teardown: cleanup_tracked_requests failed: %s", exc)
213213

214-
for key in ("ORB_CONFIG_DIR", "HF_PROVIDER_CONFDIR", "HF_PROVIDER_LOGDIR",
215-
"HF_PROVIDER_WORKDIR", "AWS_PROVIDER_LOG_DIR", "HF_LOGDIR"):
214+
for key in (
215+
"ORB_CONFIG_DIR",
216+
"HF_PROVIDER_CONFDIR",
217+
"HF_PROVIDER_LOGDIR",
218+
"HF_PROVIDER_WORKDIR",
219+
"AWS_PROVIDER_LOG_DIR",
220+
"HF_LOGDIR",
221+
):
216222
os.environ.pop(key, None)
217223
processor.cleanup_test_templates(test_name)
218224
log.removeHandler(file_handler)

0 commit comments

Comments
 (0)