Skip to content

Commit 1c82c47

Browse files
committed
Name the arguments to MongoWrapper and RedisWrapper
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
1 parent 0fc2e45 commit 1c82c47

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pyop/storage.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ def pop(self, key, default=None):
5454
@classmethod
5555
def from_uri(cls, db_uri, collection, db_name=None, ttl=None):
5656
if db_uri.startswith("mongodb"):
57-
return MongoWrapper(db_uri, db_name, collection, ttl)
58-
if db_uri.startswith("redis") or db_uri.startswith("unix"):
59-
return RedisWrapper(db_uri, collection, ttl)
57+
return MongoWrapper(
58+
db_uri=db_uri, db_name=db_name, collection=collection, ttl=ttl
59+
)
60+
elif db_uri.startswith("redis") or db_uri.startswith("unix"):
61+
return RedisWrapper(db_uri=db_uri, collection=collection, ttl=ttl)
6062

6163
return ValueError(f"Invalid DB URI: {db_uri}")
6264

0 commit comments

Comments
 (0)