remove stupid rules
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
"""Materia CLI - Management interface for BeanFlows.coffee infrastructure."""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
import typer
|
||||
from typing_extensions import Annotated
|
||||
|
||||
app = typer.Typer(
|
||||
name="materia",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
"""Pipeline execution on ephemeral workers."""
|
||||
|
||||
import paramiko
|
||||
import contextlib
|
||||
from dataclasses import dataclass
|
||||
|
||||
from materia.workers import create_worker, destroy_worker
|
||||
import paramiko
|
||||
|
||||
from materia.secrets import get_secret
|
||||
from materia.workers import create_worker, destroy_worker
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -133,7 +135,5 @@ def run_pipeline(
|
||||
|
||||
finally:
|
||||
if auto_destroy:
|
||||
try:
|
||||
with contextlib.suppress(Exception):
|
||||
destroy_worker(worker_name, provider)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -16,19 +16,19 @@ class Instance:
|
||||
|
||||
class ProviderModule(Protocol):
|
||||
def create_instance(
|
||||
name: str,
|
||||
self: str,
|
||||
instance_type: str,
|
||||
ssh_key: str,
|
||||
location: str | None = None,
|
||||
) -> Instance: ...
|
||||
|
||||
def destroy_instance(instance_id: str) -> None: ...
|
||||
def destroy_instance(self: str) -> None: ...
|
||||
|
||||
def list_instances(label: str | None = None) -> list[Instance]: ...
|
||||
def list_instances(self: str | None = None) -> list[Instance]: ...
|
||||
|
||||
def get_instance(name: str) -> Instance | None: ...
|
||||
def get_instance(self: str) -> Instance | None: ...
|
||||
|
||||
def wait_for_ssh(ip: str, timeout: int = 300) -> bool: ...
|
||||
def wait_for_ssh(self: str, timeout: int = 300) -> bool: ...
|
||||
|
||||
|
||||
def get_provider(provider_name: str) -> ProviderModule:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Hetzner Cloud provider implementation."""
|
||||
|
||||
import time
|
||||
import socket
|
||||
import time
|
||||
|
||||
from hcloud import Client
|
||||
from hcloud.images import Image
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from materia.providers import Instance, get_provider
|
||||
from materia.secrets import get_secret
|
||||
|
||||
|
||||
DEFAULT_PROVIDER = "hetzner"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user