DeprecatedClass

omni.graph.tools.DeprecatedClass(deprecation_message: Optional[str] = None) object

Decorator to deprecate a class.

Parameters

deprecation_message – A string to describe the action the user is to take to avoid the deprecated class. If None then a generic message will be provided. A deprecation message will be shown only once, the first time the deprecated class is accessed.

@DeprecatedClass("After version 1.5.0 use og.NewerClass instead")
class OlderClass:
    STATIC_VALUE = 1

obj = OlderClass()  # Gives a deprecation warning
value = OlderClass.STATIC_VALUE  # This also works for static class members and methods