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

Class CT_String

src/docx/oxml/shared.py:39–52  ·  view source on GitHub ↗

Used for `w:pStyle` and `w:tblStyle` elements and others. In those cases, it containing a style name in its `val` attribute.

Source from the content-addressed store, hash-verified

37
38
39class CT_String(BaseOxmlElement):
40 """Used for `w:pStyle` and `w:tblStyle` elements and others.
41
42 In those cases, it containing a style name in its `val` attribute.
43 """
44
45 val: str = RequiredAttribute("w:val", ST_String) # pyright: ignore[reportAssignmentType]
46
47 @classmethod
48 def new(cls, nsptagname: str, val: str):
49 """A new `CT_String`` element with tagname `nsptagname` and `val` attribute set to `val`."""
50 elm = cast(CT_String, OxmlElement(nsptagname))
51 elm.val = val
52 return elm

Callers

nothing calls this directly

Calls 1

RequiredAttributeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…