Skip to content

Commit 43bbdb4

Browse files
committed
doc: update docstring
1 parent 67212a5 commit 43bbdb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fgpyo/util/metric.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ def is_attrs_instance(metric: Metric) -> TypeGuard[inspect.AttrsInstance]:
367367
"""
368368
Test if the given metric is an attr.s instance.
369369
370-
NB: `attr.has` does not provide a type guard, which we need to use other `attr` methods such as
371-
`asdict()`, so we implement one here.
370+
NB: `attr.has` provides a type guard, but only on the class object - we want to narrow the type
371+
of the metric instance, so we implement a guard here.
372372
373373
Args:
374374
metric: An instance of a Metric.

0 commit comments

Comments
 (0)