|
2 | 2 | gdtest_dataclasses — @dataclass objects. |
3 | 3 |
|
4 | 4 | Dimensions: A1, B1, C5, D1, E6, F6, G1, H7 |
5 | | -Focus: 3 dataclasses: one with default_factory, one frozen, one that also |
6 | | - defines methods. Tests dataclass field documentation, __init__ |
7 | | - generation, and that a dataclass which defines methods still renders its |
8 | | - constructor signature (regression: `Class.overloads` is a dict keyed by |
9 | | - member name, so any class with methods was rendered through the overload |
10 | | - path and lost its constructor parameters). |
| 5 | +Focus: 3 dataclasses: one with default_factory, one frozen (documented with an |
| 6 | + `Attributes` section), one that also defines methods. Tests dataclass |
| 7 | + field documentation, __init__ generation, that fields documented under |
| 8 | + either a `Parameters` or an `Attributes` section render once (no |
| 9 | + duplicated "Parameter Attributes"), and that a dataclass which defines |
| 10 | + methods still renders its constructor signature (regression: |
| 11 | + `Class.overloads` is a dict keyed by member name, so any class with |
| 12 | + methods was rendered through the overload path and lost its constructor |
| 13 | + parameters). |
11 | 14 | """ |
12 | 15 |
|
13 | 16 | SPEC = { |
@@ -62,7 +65,10 @@ class Record: |
62 | 65 | """ |
63 | 66 | An immutable data record. |
64 | 67 |
|
65 | | - Parameters |
| 68 | + Documented with an ``Attributes`` section (rather than |
| 69 | + ``Parameters``) to exercise that rendering path. |
| 70 | +
|
| 71 | + Attributes |
66 | 72 | ---------- |
67 | 73 | id |
68 | 74 | Unique record identifier. |
|
0 commit comments