1
0

WalletDB: (trivial) add type hint

This commit is contained in:
SomberNight
2024-02-12 18:26:08 +00:00
parent b6e5fe8dbe
commit b3a908f647
2 changed files with 10 additions and 3 deletions

View File

@@ -25,7 +25,7 @@
import threading
import copy
import json
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Optional
import jsonpatch
from . import util
@@ -213,7 +213,14 @@ class StoredList(list):
class JsonDB(Logger):
def __init__(self, s: str, storage=None, encoder=None, upgrader=None):
def __init__(
self,
s: str,
*,
storage: Optional['WalletStorage'] = None,
encoder=None,
upgrader=None,
):
Logger.__init__(self)
self.lock = threading.RLock()
self.storage = storage