Skip to content

Commit b9c4cc8

Browse files
committed
types: annotate __get__
Signed-off-by: nstarman <[email protected]>
1 parent 8699aeb commit b9c4cc8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

quax/_core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,13 @@ def __call__(self, *args, **kwargs):
334334
out = jtu.tree_map(ft.partial(_unwrap_tracer, trace), out)
335335
return out
336336

337-
def __get__(self, instance: object | None, owner: Any):
337+
def __get__(
338+
self, instance: object | None, owner: Any
339+
) -> Union["_Quaxify[CT]", eqx.Partial["_Quaxify[CT]"]]:
340+
# Getting from a class
338341
if instance is None:
339342
return self
343+
# Getting from an instance
340344
return eqx.Partial(self, instance)
341345

342346

0 commit comments

Comments
 (0)