Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pyfed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
pyfed
Commits
037b9b84
Commit
037b9b84
authored
2 months ago
by
SDaron
Browse files
Options
Downloads
Patches
Plain Diff
SQLStorageBackend -> StorageBackend
parent
89489fae
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pyfed/storage/__init__.py
+3
-3
3 additions, 3 deletions
src/pyfed/storage/__init__.py
src/pyfed/utils/exceptions.py
+5
-1
5 additions, 1 deletion
src/pyfed/utils/exceptions.py
with
8 additions
and
4 deletions
src/pyfed/storage/__init__.py
+
3
−
3
View file @
037b9b84
...
...
@@ -7,7 +7,7 @@
# - Storage provider protocol
# """
from
.base
import
SQL
StorageBackend
from
.base
import
StorageBackend
# from .backends.postgresql import PostgreSQLStorage
# from .backends.mongodb import MongoDBStorageBackend
# from .backends.redis import RedisStorageBackend
...
...
@@ -33,7 +33,7 @@ from .base import SQLStorageBackend
# 'sqlite': SQLiteStorage
# }
def
get_storage_backend
(
backend_type
:
str
)
->
type
[
SQL
StorageBackend
]:
def
get_storage_backend
(
backend_type
:
str
)
->
type
[
StorageBackend
]:
"""
Get storage backend class by type.
"""
if
backend_type
not
in
STORAGE_BACKENDS
:
raise
ValueError
(
f
"
Unknown storage backend:
{
backend_type
}
"
)
...
...
@@ -41,4 +41,4 @@ def get_storage_backend(backend_type: str) -> type[SQLStorageBackend]:
# def register_backend(name: str, backend_class: type[StorageBackend]) -> None:
# """Register a new storage backend."""
# STORAGE_BACKENDS[name] = backend_class
\ No newline at end of file
# STORAGE_BACKENDS[name] = backend_class
This diff is collapsed.
Click to expand it.
src/pyfed/utils/exceptions.py
+
5
−
1
View file @
037b9b84
...
...
@@ -142,4 +142,8 @@ class IntegrationError(ActivityPubException):
class
MiddlewareError
(
ActivityPubException
):
"""
Raised when middleware-related errors occur.
"""
pass
\ No newline at end of file
pass
class
ConfigError
(
ActivityPubException
):
"""
Raised when signature-related errors occur.
"""
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment