From 4f8c8720c2c27e7c5df529c9b0cb2b3ad364fb67 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Tue, 25 Apr 2023 13:01:36 -0400 Subject: Fix deprecation warning formatting in docs, require deprecated_in parameter --- python/architecture.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'python/architecture.py') diff --git a/python/architecture.py b/python/architecture.py index 60731eee..9c5cb64d 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -39,6 +39,7 @@ from . import callingconvention from . import typelibrary from . import function from . import binaryview +from . import deprecation RegisterIndex = NewType('RegisterIndex', int) RegisterStackIndex = NewType('RegisterStackIndex', int) @@ -1965,10 +1966,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return NotImplemented + @deprecation.deprecated(deprecated_in="3.1.3724") def is_view_type_constant_defined(self, type_name: str, const_name: str) -> bool: """ - This API is deprecated and should not be used anymore. - :param str type_name: the BinaryView type name of the constant to query :param str const_name: the constant name to query :rtype: None @@ -1984,10 +1984,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return False + @deprecation.deprecated(deprecated_in="3.1.3724") def get_view_type_constant(self, type_name: str, const_name: str, default_value: int = 0) -> int: """ - This API is deprecated and should not be used anymore. - ``get_view_type_constant`` retrieves the view type constant for the given type_name and const_name. :param str type_name: the BinaryView type name of the constant to be retrieved @@ -2006,10 +2005,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return 0 + @deprecation.deprecated(deprecated_in="3.1.3724") def set_view_type_constant(self, type_name: str, const_name: str, value: int) -> None: """ - This API is deprecated and should not be used anymore. - ``set_view_type_constant`` creates a new binaryview type constant. :param str type_name: the BinaryView type name of the constant to be registered -- cgit v1.3.1