From 939f4f79a0343f707ac68f18ba6b0dd319fb4f80 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 8 Feb 2023 13:37:37 -0500 Subject: Change Function.user_type -> Function.has_user_type, deprecate Function.explicitly_defined_type in favor of Function.has_explicitly_defined_type --- python/function.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'python/function.py') diff --git a/python/function.py b/python/function.py index 80dd3968..0c411764 100644 --- a/python/function.py +++ b/python/function.py @@ -545,7 +545,13 @@ class Function: core.BNSetUserFunctionCanReturn(self.handle, bc) @property + @deprecation.deprecated(details="Use Function.has_explicitly_defined_type instead.") def explicitly_defined_type(self) -> bool: + """Whether function has explicitly defined types (read-only)""" + return self.has_explicitly_defined_type + + @property + def has_explicitly_defined_type(self) -> bool: """Whether function has explicitly defined types (read-only)""" return core.BNFunctionHasExplicitlyDefinedType(self.handle) @@ -2513,7 +2519,7 @@ class Function: core.BNSetFunctionUserType(self.handle, value.handle) @property - def user_type(self) -> bool: + def has_user_type(self) -> bool: """True if the function has a user-defined type""" return core.BNFunctionHasUserType(self.handle) -- cgit v1.3.1