Skip to content
Snippets Groups Projects
Commit 037b9b84 authored by SDaron's avatar SDaron
Browse files

SQLStorageBackend -> StorageBackend

parent 89489fae
No related branches found
No related tags found
1 merge request!17Few fixes (wrong names, missing __init__.py files, doc links)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# - Storage provider protocol # - Storage provider protocol
# """ # """
from .base import SQLStorageBackend from .base import StorageBackend
# from .backends.postgresql import PostgreSQLStorage # from .backends.postgresql import PostgreSQLStorage
# from .backends.mongodb import MongoDBStorageBackend # from .backends.mongodb import MongoDBStorageBackend
# from .backends.redis import RedisStorageBackend # from .backends.redis import RedisStorageBackend
...@@ -33,7 +33,7 @@ from .base import SQLStorageBackend ...@@ -33,7 +33,7 @@ from .base import SQLStorageBackend
# 'sqlite': SQLiteStorage # 'sqlite': SQLiteStorage
# } # }
def get_storage_backend(backend_type: str) -> type[SQLStorageBackend]: def get_storage_backend(backend_type: str) -> type[StorageBackend]:
"""Get storage backend class by type.""" """Get storage backend class by type."""
if backend_type not in STORAGE_BACKENDS: if backend_type not in STORAGE_BACKENDS:
raise ValueError(f"Unknown storage backend: {backend_type}") raise ValueError(f"Unknown storage backend: {backend_type}")
...@@ -41,4 +41,4 @@ def get_storage_backend(backend_type: str) -> type[SQLStorageBackend]: ...@@ -41,4 +41,4 @@ def get_storage_backend(backend_type: str) -> type[SQLStorageBackend]:
# def register_backend(name: str, backend_class: type[StorageBackend]) -> None: # def register_backend(name: str, backend_class: type[StorageBackend]) -> None:
# """Register a new storage backend.""" # """Register a new storage backend."""
# STORAGE_BACKENDS[name] = backend_class # STORAGE_BACKENDS[name] = backend_class
\ No newline at end of file
...@@ -142,4 +142,8 @@ class IntegrationError(ActivityPubException): ...@@ -142,4 +142,8 @@ class IntegrationError(ActivityPubException):
class MiddlewareError(ActivityPubException): class MiddlewareError(ActivityPubException):
"""Raised when middleware-related errors occur.""" """Raised when middleware-related errors occur."""
pass pass
\ No newline at end of file
class ConfigError(ActivityPubException):
"""Raised when signature-related errors occur."""
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment