Skip to content

Commit

Permalink
fix: removed mongodb storage
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Mar 11, 2023
1 parent 58fbd72 commit 330b415
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 331 deletions.
18 changes: 1 addition & 17 deletions aw_datastore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform as _platform
from typing import Callable, Dict

from . import storages
Expand All @@ -7,28 +6,13 @@


def get_storage_methods() -> Dict[str, Callable[..., storages.AbstractStorage]]:
from .storages import (
MemoryStorage,
MongoDBStorage,
PeeweeStorage,
SqliteStorage,
)
from .storages import MemoryStorage, PeeweeStorage, SqliteStorage

methods: Dict[str, Callable[..., storages.AbstractStorage]] = {
PeeweeStorage.sid: PeeweeStorage,
MemoryStorage.sid: MemoryStorage,
SqliteStorage.sid: SqliteStorage,
}

# MongoDB is not supported on Windows or macOS
if _platform.system() == "Linux": # pragma: no branch
try:
import pymongo # noqa: F401

methods[MongoDBStorage.sid] = MongoDBStorage
except ImportError: # pragma: no cover
pass

return methods


Expand Down
2 changes: 0 additions & 2 deletions aw_datastore/storages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

from .abstract import AbstractStorage
from .memory import MemoryStorage
from .mongodb import MongoDBStorage
from .peewee import PeeweeStorage
from .sqlite import SqliteStorage

__all__ = [
"AbstractStorage",
"MemoryStorage",
"MongoDBStorage",
"PeeweeStorage",
"SqliteStorage",
]
175 changes: 0 additions & 175 deletions aw_datastore/storages/mongodb.py

This file was deleted.

Loading

0 comments on commit 330b415

Please sign in to comment.