LdrawRefsTree = tuple[Path, '_SubRefs']
_SubRefs = dict[str, LdrawRefsTree]
-_Walker = Callable[[str], Any]
class LdrawDb:
def _walk_tree(
self,
filename: str,
- collect: Callable[[_Walker, str, list[str]], Any],
+ collect: Callable[[Callable[[str], Any], str, list[str]], Any],
result: Callable[[Path, list[Any]], Any],
) -> Any:
path = self.path(filename)
) -> int:
'On item at {._root}/p(art)/{filename} count studs.'
def count_studs(
- walker: _Walker,
+ walker: Callable[[str], int],
ref: str,
toks: list[str]
) -> int: