lint fixes

This commit is contained in:
Maxim Devaev
2024-05-13 17:52:04 +03:00
parent bf87f036d3
commit 9158abfab4
10 changed files with 23 additions and 24 deletions

View File

@@ -26,7 +26,6 @@ import multiprocessing.queues
import queue
import shlex
from typing import Hashable
from typing import TypeVar
@@ -45,7 +44,7 @@ def efmt(err: Exception) -> str:
# =====
def rget(dct: dict, *keys: Hashable) -> dict:
def rget(dct: dict, *keys: str) -> dict:
result = functools.reduce((lambda nxt, key: nxt.get(key, {})), keys, dct)
if not isinstance(result, dict):
raise TypeError(f"Not a dict as result: {result!r} from {dct!r} at {list(keys)}")