MCPcopy Create free account
hub / github.com/scanny/python-pptx / _validate_margin_value

Method _validate_margin_value

src/pptx/table.py:374–378  ·  view source on GitHub ↗

Raise ValueError if `margin_value` is not a positive integer value or |None|.

(margin_value: Length | None)

Source from the content-addressed store, hash-verified

372
373 @staticmethod
374 def _validate_margin_value(margin_value: Length | None) -> None:
375 """Raise ValueError if `margin_value` is not a positive integer value or |None|."""
376 if not isinstance(margin_value, int) and margin_value is not None:
377 tmpl = "margin value must be integer or None, got '%s'"
378 raise TypeError(tmpl % margin_value)
379
380
381class _Column(Subshape):

Callers 4

margin_leftMethod · 0.95
margin_rightMethod · 0.95
margin_topMethod · 0.95
margin_bottomMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected