(obj: BaseOxmlElement)
| 238 | """function object suitable for "get" side of attr property descriptor.""" |
| 239 | |
| 240 | def get_attr_value(obj: BaseOxmlElement) -> Any | None: |
| 241 | attr_str_value = obj.get(self._clark_name) |
| 242 | if attr_str_value is None: |
| 243 | raise InvalidXmlError( |
| 244 | "required '%s' attribute not present on element %s" % (self._attr_name, obj.tag) |
| 245 | ) |
| 246 | return self._simple_type.from_xml(attr_str_value) |
| 247 | |
| 248 | get_attr_value.__doc__ = self._docstring |
| 249 | return get_attr_value |
nothing calls this directly
no test coverage detected