home · contact · privacy
Minor type-hinting improvement.
authorPlom Heller <plom@plomlompom.com>
Tue, 4 Aug 2026 22:01:00 +0000 (00:01 +0200)
committerPlom Heller <plom@plomlompom.com>
Tue, 4 Aug 2026 22:01:00 +0000 (00:01 +0200)
src/bricksplom/ldraw.py

index d0134cbf8dea34be3b1a53baf832aeff541f17f6..e8993819c9f7d6107bddb7ea9ef0319ebc2cc460 100644 (file)
@@ -21,7 +21,6 @@ LDRAW_STUDS = {
 
 LdrawRefsTree = tuple[Path, '_SubRefs']
 _SubRefs = dict[str, LdrawRefsTree]
-_Walker = Callable[[str], Any]
 
 
 class LdrawDb:
@@ -47,7 +46,7 @@ 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)
@@ -80,7 +79,7 @@ class LdrawDb:
             ) -> 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: