blob: c66646528bda8afa895443353e8377aa79a20806 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
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
def deprecated(cls):
deprecated_note = '''
.. warning:: This object is deprecated. Please migrate code away from using this class or method.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ = deprecated_note + cls.__doc__
else:
cls.__doc__ = deprecated_note
return cls
def enterprise(cls):
enterprise_note = '''
.. note: This object is only available in the Enterprise edition of Binary Ninja.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ = enterprise_note + cls.__doc__
else:
cls.__doc__ = enterprise_note
return cls
|