Skip to content

Commit 02f9ca3

Browse files
kesmit13claude
andcommitted
fix: resolve code quality and type safety issues in management API
- Fix syntax error in test_management.py (unterminated string literal) - Remove unused imports and fix line length violations for flake8 compliance - Add missing type annotations and fix mypy type errors - Add to_dict() method to ReplicatedDatabase class - Add from_dict() and metric_name property to WorkspaceGroupMetrics class - Fix import issues and attribute access patterns in workspace.py - Ensure all pre-commit hooks pass (flake8, mypy, autopep8) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5f54faa commit 02f9ca3

File tree

9 files changed

+1398
-708
lines changed

9 files changed

+1398
-708
lines changed

singlestoredb/management/audit_logs.py

Lines changed: 205 additions & 149 deletions
Large diffs are not rendered by default.

singlestoredb/management/billing_usage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def from_dict(
8282
owner_id=obj['ownerId'],
8383
resource_id=obj['resourceId'],
8484
resource_name=obj['resourceName'],
85-
resource_type=obj['resource_type'],
85+
resource_type=obj['resourceType'],
8686
value=obj['value'],
8787
)
8888
out._manager = manager
@@ -142,7 +142,7 @@ def from_dict(
142142
out = cls(
143143
description=obj['description'],
144144
metric=str(camel_to_snake(obj['metric'])),
145-
usage=[UsageItem.from_dict(x, manager) for x in obj['Usage']],
145+
usage=[UsageItem.from_dict(x, manager) for x in obj['usage']],
146146
)
147147
out._manager = manager
148148
return out

0 commit comments

Comments
 (0)