summaryrefslogtreecommitdiff
path: root/python/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/decorators.py')
-rw-r--r--python/decorators.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/decorators.py b/python/decorators.py
new file mode 100644
index 00000000..bd4a82c7
--- /dev/null
+++ b/python/decorators.py
@@ -0,0 +1,13 @@
+def passive(cls):
+ passive_note = '''
+
+ .. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
+'''
+
+ if hasattr(cls, ".__doc__") and cls.__doc__:
+ cls.__doc__ += passive_note
+ else:
+ cls.__doc__ = passive_note
+
+ return cls
+