mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
Apply monkeytype traces
Run
monkeytype run jw-acc.py --log-level debug db import --format mdb-json-dir dbs
monkeytype list-modules | grep ^jw | while read m; do
monkeytype apply $m
done
and fix the fallout.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
440b40e267
commit
3a7fb50979
2 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import annotations
|
||||
from collections import OrderedDict
|
||||
from typing import Optional, Union
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
from jwutils.log import *
|
||||
|
||||
def quote(s):
|
||||
|
|
@ -36,7 +37,7 @@ class StringTree: # export
|
|||
def __init__(self, path: str, content: str) -> None:
|
||||
slog(DEBUG, "ctor, path =", path, "content =", content)
|
||||
self.children: OrderedDict[str, StringTree] = OrderedDict()
|
||||
self.content = None
|
||||
self.content: Optional[str] = None
|
||||
self.__set(path, content)
|
||||
assert(hasattr(self, "content"))
|
||||
#assert self.content is not None
|
||||
|
|
@ -180,7 +181,7 @@ class StringTree: # export
|
|||
raise Exception('tried to get value from leave "{}"'.format(self.content))
|
||||
return self.children[next(reversed(self.children))].content # type: ignore
|
||||
|
||||
def child_list(self, depth_first=True):
|
||||
def child_list(self, depth_first: bool=True) -> List[StringTree]:
|
||||
if depth_first == False:
|
||||
raise Exception("tried to retrieve child list with breadth-first search, not yet implemented")
|
||||
r = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue