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

Method validate

src/pptx/enum/base.py:93–96  ·  view source on GitHub ↗

Raise |ValueError| if `value` is not an assignable value.

(cls: Type[_T], value: _T)

Source from the content-addressed store, hash-verified

91
92 @classmethod
93 def validate(cls: Type[_T], value: _T):
94 """Raise |ValueError| if `value` is not an assignable value."""
95 if value not in cls:
96 raise ValueError(f"{value} not a member of {cls.__name__} enumeration")
97
98
99class DocsPageFormatter(object):

Callers 2

validate.pyFile · 0.45
auto_shape_typeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected