mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-01 12:25:53 +08:00
tweaked DataclassFieldLookup typing
This commit is contained in:
parent
8fde389001
commit
36af7d7154
@ -55,7 +55,7 @@ class _PathCapture:
|
|||||||
class DataclassFieldLookup(Generic[T]):
|
class DataclassFieldLookup(Generic[T]):
|
||||||
"""Get info about nested dataclass fields in type-safe way."""
|
"""Get info about nested dataclass fields in type-safe way."""
|
||||||
|
|
||||||
def __init__(self, cls: T) -> None:
|
def __init__(self, cls: Type[T]) -> None:
|
||||||
self.cls = cls
|
self.cls = cls
|
||||||
|
|
||||||
def path(self, callback: Callable[[T], Any]) -> str:
|
def path(self, callback: Callable[[T], Any]) -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user