Use dict[str, Any] for JSON repository document types.
PR Title Check / check-title (pull_request) Successful in 6s
Code Quality Pipeline / code-quality (pull_request) Successful in 1m28s
Test Python Package / unit-tests (pull_request) Successful in 1m29s
Test Python Package / coverage-report (pull_request) Successful in 16s
Test Python Package / integration-tests (pull_request) Successful in 48s
PR Title Check / check-title (pull_request) Successful in 6s
Code Quality Pipeline / code-quality (pull_request) Successful in 1m28s
Test Python Package / unit-tests (pull_request) Successful in 1m29s
Test Python Package / coverage-report (pull_request) Successful in 16s
Test Python Package / integration-tests (pull_request) Successful in 48s
Clarifies that JSON CRUD operates on string-keyed objects without changing runtime behavior. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
bd4794d1c0
commit
42e885edd5
@@ -2,18 +2,19 @@
|
||||
|
||||
from collections.abc import Iterator
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any
|
||||
|
||||
|
||||
class JsonRepositoryInterface(ABC):
|
||||
"""Interface that defines JSON document CRUD methods."""
|
||||
|
||||
@abstractmethod
|
||||
def get(self, key: str) -> dict | None:
|
||||
def get(self, key: str) -> dict[str, Any] | None:
|
||||
"""Get a JSON object by key."""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def set(self, key: str, data: dict) -> None:
|
||||
def set(self, key: str, data: dict[str, Any]) -> None:
|
||||
"""Set a JSON object by key."""
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user