MCPcopy Create free account
hub / github.com/STIXProject/python-stix / field

Function field

stix/utils/deprecated.py:25–29  ·  view source on GitHub ↗

Raise a Python UserWarning if the `value` is not None. This is to be used with a TypedField preset or postset hook.

(instance, value)

Source from the content-addressed store, hash-verified

23
24
25def field(instance, value):
26 """Raise a Python UserWarning if the `value` is not None. This is to be
27 used with a TypedField preset or postset hook.
28 """
29 warn(value)
30
31
32def warn(value):

Callers

nothing calls this directly

Calls 1

warnFunction · 0.85

Tested by

no test coverage detected