Skip to content

Commit 32c8cad

Browse files
committed
Correct the example AnnotationClass code in the docs.
1 parent 9d09ae7 commit 32c8cad

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ is created.
7777

7878
```python
7979
from ducktools.classbuilder import (
80-
SlotMakerMeta,
81-
annotation_gatherer,
80+
SlotMakerMeta,
8281
builder,
8382
check_argument_order,
8483
default_methods,
84+
unified_gatherer,
8585
)
8686

8787

@@ -91,7 +91,7 @@ class AnnotationClass(metaclass=SlotMakerMeta):
9191
def __init_subclass__(
9292
cls,
9393
methods=default_methods,
94-
gatherer=annotation_gatherer,
94+
gatherer=unified_gatherer,
9595
**kwargs
9696
):
9797
# Check class dict otherwise this will always be True as this base
@@ -103,12 +103,11 @@ class AnnotationClass(metaclass=SlotMakerMeta):
103103
super().__init_subclass__(**kwargs)
104104

105105

106-
107106
class AnnotatedDC(AnnotationClass):
108107
the_answer: int = 42
109108
the_question: str = "What do you get if you multiply six by nine?"
110109

111-
110+
112111
ex = AnnotatedDC()
113112
print(ex)
114113
```

0 commit comments

Comments
 (0)