MCPcopy Index your code
hub / github.com/python-openxml/python-docx / first_line_indent

Method first_line_indent

src/docx/oxml/text/parfmt.py:123–138  ·  view source on GitHub ↗

A |Length| value calculated from the values of `w:ind/@w:firstLine` and `w:ind/@w:hanging`. Returns |None| if the `w:ind` child is not present.

(self)

Source from the content-addressed store, hash-verified

121
122 @property
123 def first_line_indent(self) -> Length | None:
124 """A |Length| value calculated from the values of `w:ind/@w:firstLine` and
125 `w:ind/@w:hanging`.
126
127 Returns |None| if the `w:ind` child is not present.
128 """
129 ind = self.ind
130 if ind is None:
131 return None
132 hanging = ind.hanging
133 if hanging is not None:
134 return Length(-hanging)
135 firstLine = ind.firstLine
136 if firstLine is None:
137 return None
138 return firstLine
139
140 @first_line_indent.setter
141 def first_line_indent(self, value: Length | None):

Callers

nothing calls this directly

Calls 1

LengthClass · 0.90

Tested by

no test coverage detected