2828class CT_Ind (BaseOxmlElement ):
2929 """``<w:ind>`` element, specifying paragraph indentation."""
3030
31- left = OptionalAttribute ("w:left" , ST_SignedTwipsMeasure )
32- right = OptionalAttribute ("w:right" , ST_SignedTwipsMeasure )
33- firstLine = OptionalAttribute ("w:firstLine" , ST_TwipsMeasure )
34- hanging = OptionalAttribute ("w:hanging" , ST_TwipsMeasure )
31+ left : Length | None = OptionalAttribute ( # pyright: ignore[reportAssignmentType]
32+ "w:left" , ST_SignedTwipsMeasure
33+ )
34+ right : Length | None = OptionalAttribute ( # pyright: ignore[reportAssignmentType]
35+ "w:right" , ST_SignedTwipsMeasure
36+ )
37+ firstLine : Length | None = OptionalAttribute ( # pyright: ignore[reportAssignmentType]
38+ "w:firstLine" , ST_TwipsMeasure
39+ )
40+ hanging : Length | None = OptionalAttribute ( # pyright: ignore[reportAssignmentType]
41+ "w:hanging" , ST_TwipsMeasure
42+ )
3543
3644
3745class CT_Jc (BaseOxmlElement ):
@@ -45,6 +53,7 @@ class CT_Jc(BaseOxmlElement):
4553class CT_PPr (BaseOxmlElement ):
4654 """``<w:pPr>`` element, containing the properties for a paragraph."""
4755
56+ get_or_add_ind : Callable [[], CT_Ind ]
4857 get_or_add_pStyle : Callable [[], CT_String ]
4958 _insert_sectPr : Callable [[CT_SectPr ], None ]
5059 _remove_pStyle : Callable [[], None ]
@@ -98,13 +107,15 @@ class CT_PPr(BaseOxmlElement):
98107 numPr = ZeroOrOne ("w:numPr" , successors = _tag_seq [7 :])
99108 tabs = ZeroOrOne ("w:tabs" , successors = _tag_seq [11 :])
100109 spacing = ZeroOrOne ("w:spacing" , successors = _tag_seq [22 :])
101- ind = ZeroOrOne ("w:ind" , successors = _tag_seq [23 :])
110+ ind : CT_Ind | None = ZeroOrOne ( # pyright: ignore[reportAssignmentType]
111+ "w:ind" , successors = _tag_seq [23 :]
112+ )
102113 jc = ZeroOrOne ("w:jc" , successors = _tag_seq [27 :])
103114 sectPr = ZeroOrOne ("w:sectPr" , successors = _tag_seq [35 :])
104115 del _tag_seq
105116
106117 @property
107- def first_line_indent (self ):
118+ def first_line_indent (self ) -> Length | None :
108119 """A |Length| value calculated from the values of `w:ind/@w:firstLine` and
109120 `w:ind/@w:hanging`.
110121
@@ -122,7 +133,7 @@ def first_line_indent(self):
122133 return firstLine
123134
124135 @first_line_indent .setter
125- def first_line_indent (self , value ):
136+ def first_line_indent (self , value : Length | None ):
126137 if self .ind is None and value is None :
127138 return
128139 ind = self .get_or_add_ind ()
@@ -135,30 +146,30 @@ def first_line_indent(self, value):
135146 ind .firstLine = value
136147
137148 @property
138- def ind_left (self ):
149+ def ind_left (self ) -> Length | None :
139150 """The value of `w:ind/@w:left` or |None| if not present."""
140151 ind = self .ind
141152 if ind is None :
142153 return None
143154 return ind .left
144155
145156 @ind_left .setter
146- def ind_left (self , value ):
157+ def ind_left (self , value : Length | None ):
147158 if value is None and self .ind is None :
148159 return
149160 ind = self .get_or_add_ind ()
150161 ind .left = value
151162
152163 @property
153- def ind_right (self ):
164+ def ind_right (self ) -> Length | None :
154165 """The value of `w:ind/@w:right` or |None| if not present."""
155166 ind = self .ind
156167 if ind is None :
157168 return None
158169 return ind .right
159170
160171 @ind_right .setter
161- def ind_right (self , value ):
172+ def ind_right (self , value : Length | None ):
162173 if value is None and self .ind is None :
163174 return
164175 ind = self .get_or_add_ind ()
@@ -340,9 +351,15 @@ class CT_TabStop(BaseOxmlElement):
340351 only needs a __str__ method.
341352 """
342353
343- val = RequiredAttribute ("w:val" , WD_TAB_ALIGNMENT )
344- leader = OptionalAttribute ("w:leader" , WD_TAB_LEADER , default = WD_TAB_LEADER .SPACES )
345- pos = RequiredAttribute ("w:pos" , ST_SignedTwipsMeasure )
354+ val : WD_TAB_ALIGNMENT = RequiredAttribute ( # pyright: ignore[reportAssignmentType]
355+ "w:val" , WD_TAB_ALIGNMENT
356+ )
357+ leader : WD_TAB_LEADER | None = OptionalAttribute ( # pyright: ignore[reportAssignmentType]
358+ "w:leader" , WD_TAB_LEADER , default = WD_TAB_LEADER .SPACES
359+ )
360+ pos : Length = RequiredAttribute ( # pyright: ignore[reportAssignmentType]
361+ "w:pos" , ST_SignedTwipsMeasure
362+ )
346363
347364 def __str__ (self ) -> str :
348365 """Text equivalent of a `w:tab` element appearing in a run.
0 commit comments