plan + fmt
This commit is contained in:
@@ -7,14 +7,10 @@ from .models import ConnectionConfig
|
||||
|
||||
def parse_connection_id(connection_id: str) -> tuple[str, str]:
|
||||
if "." not in connection_id:
|
||||
raise ValueError(
|
||||
"connection id must look like '<server>.<account>'"
|
||||
)
|
||||
raise ValueError("connection id must look like '<server>.<account>'")
|
||||
server, account = connection_id.split(".", 1)
|
||||
if not server or not account:
|
||||
raise ValueError(
|
||||
"connection id must look like '<server>.<account>'"
|
||||
)
|
||||
raise ValueError("connection id must look like '<server>.<account>'")
|
||||
return server, account
|
||||
|
||||
|
||||
@@ -37,5 +33,6 @@ class ConnectionRegistry:
|
||||
return self.connections[connection_id]
|
||||
|
||||
def list_enabled(self) -> list[ConnectionConfig]:
|
||||
return [connection for connection in self.connections.values() if connection.enabled]
|
||||
|
||||
return [
|
||||
connection for connection in self.connections.values() if connection.enabled
|
||||
]
|
||||
|
||||
@@ -61,4 +61,3 @@ def dump_catalog_snapshot(snapshot: CatalogSnapshot) -> dict[str, Any]:
|
||||
"max_age_seconds": snapshot.max_age_seconds,
|
||||
"nodes": [asdict(node) for node in snapshot.nodes],
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -58,7 +58,9 @@ class WfMcpService:
|
||||
) -> None:
|
||||
self.connections.get(connection_id)
|
||||
qualified_specs = {
|
||||
qualify_node_name(connection_id, spec.name): _qualify_spec(connection_id, spec)
|
||||
qualify_node_name(connection_id, spec.name): _qualify_spec(
|
||||
connection_id, spec
|
||||
)
|
||||
for spec in specs
|
||||
}
|
||||
self.specs_by_connection[connection_id] = qualified_specs
|
||||
|
||||
@@ -78,4 +78,3 @@ class FileStore(Store):
|
||||
max_age_seconds=data["max_age_seconds"],
|
||||
nodes=[CatalogNodeEntry(**node) for node in data.get("nodes", [])],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user