A |NumberingPart| object providing access to the numbering definitions for this document. Creates an empty numbering part if one is not present.
(self)
| 97 | |
| 98 | @lazyproperty |
| 99 | def numbering_part(self) -> NumberingPart: |
| 100 | """A |NumberingPart| object providing access to the numbering definitions for this document. |
| 101 | |
| 102 | Creates an empty numbering part if one is not present. |
| 103 | """ |
| 104 | try: |
| 105 | return cast(NumberingPart, self.part_related_by(RT.NUMBERING)) |
| 106 | except KeyError: |
| 107 | numbering_part = NumberingPart.new() |
| 108 | self.relate_to(numbering_part, RT.NUMBERING) |
| 109 | return numbering_part |
| 110 | |
| 111 | def save(self, path_or_stream: str | IO[bytes]): |
| 112 | """Save this document to `path_or_stream`, which can be either a path to a |
nothing calls this directly
no test coverage detected