diff --git a/.sdk-version b/.sdk-version index 25af363..f2bc310 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.28.0 +v2.32.0 diff --git a/docs/FunctionMappingFull.md b/docs/FunctionMappingFull.md index f068fc2..057aaa4 100644 --- a/docs/FunctionMappingFull.md +++ b/docs/FunctionMappingFull.md @@ -8,14 +8,16 @@ Name | Type | Description | Notes **inverse_string_map** | [**Dict[str, InverseStringMapItem]**](InverseStringMapItem.md) | | **inverse_function_map** | [**Dict[str, InverseFunctionMapItem]**](InverseFunctionMapItem.md) | | **unmatched_functions** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_external_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_custom_types** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_strings** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_go_to_labels** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_custom_function_pointers** | [**Dict[str, InverseValue]**](InverseValue.md) | | **unmatched_variadic_lists** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_enums** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_global_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | **fields** | **Dict[str, Dict[str, InverseValue]]** | | +**unmatched_external_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | No longer provided. | [optional] ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index 66c40fb..5cddd8c 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.28.0" +__version__ = "v2.32.0" # Define package exports __all__ = [ diff --git a/revengai/api_client.py b/revengai/api_client.py index 160f864..9659c71 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v2.28.0/python' + self.user_agent = 'OpenAPI-Generator/v2.32.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 30702c2..4eb44b0 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v2.28.0\n"\ - "SDK Package Version: v2.28.0".\ + "Version of the API: v2.32.0\n"\ + "SDK Package Version: v2.32.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/function_mapping_full.py b/revengai/models/function_mapping_full.py index 5c9f194..1cbd4be 100644 --- a/revengai/models/function_mapping_full.py +++ b/revengai/models/function_mapping_full.py @@ -16,8 +16,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional from revengai.models.inverse_function_map_item import InverseFunctionMapItem from revengai.models.inverse_string_map_item import InverseStringMapItem from revengai.models.inverse_value import InverseValue @@ -31,15 +31,17 @@ class FunctionMappingFull(BaseModel): inverse_string_map: Dict[str, InverseStringMapItem] inverse_function_map: Dict[str, InverseFunctionMapItem] unmatched_functions: Dict[str, InverseValue] - unmatched_external_vars: Dict[str, InverseValue] unmatched_custom_types: Dict[str, InverseValue] unmatched_strings: Dict[str, InverseValue] unmatched_vars: Dict[str, InverseValue] unmatched_go_to_labels: Dict[str, InverseValue] unmatched_custom_function_pointers: Dict[str, InverseValue] unmatched_variadic_lists: Dict[str, InverseValue] + unmatched_enums: Dict[str, InverseValue] + unmatched_global_vars: Dict[str, InverseValue] fields: Dict[str, Dict[str, InverseValue]] - __properties: ClassVar[List[str]] = ["inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_external_vars", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "fields"] + unmatched_external_vars: Optional[Dict[str, InverseValue]] = Field(default=None, description="No longer provided.") + __properties: ClassVar[List[str]] = ["inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "unmatched_enums", "unmatched_global_vars", "fields", "unmatched_external_vars"] model_config = ConfigDict( populate_by_name=True, @@ -101,13 +103,6 @@ def to_dict(self) -> Dict[str, Any]: if self.unmatched_functions[_key_unmatched_functions]: _field_dict[_key_unmatched_functions] = self.unmatched_functions[_key_unmatched_functions].to_dict() _dict['unmatched_functions'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_external_vars (dict) - _field_dict = {} - if self.unmatched_external_vars: - for _key_unmatched_external_vars in self.unmatched_external_vars: - if self.unmatched_external_vars[_key_unmatched_external_vars]: - _field_dict[_key_unmatched_external_vars] = self.unmatched_external_vars[_key_unmatched_external_vars].to_dict() - _dict['unmatched_external_vars'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in unmatched_custom_types (dict) _field_dict = {} if self.unmatched_custom_types: @@ -150,6 +145,20 @@ def to_dict(self) -> Dict[str, Any]: if self.unmatched_variadic_lists[_key_unmatched_variadic_lists]: _field_dict[_key_unmatched_variadic_lists] = self.unmatched_variadic_lists[_key_unmatched_variadic_lists].to_dict() _dict['unmatched_variadic_lists'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_enums (dict) + _field_dict = {} + if self.unmatched_enums: + for _key_unmatched_enums in self.unmatched_enums: + if self.unmatched_enums[_key_unmatched_enums]: + _field_dict[_key_unmatched_enums] = self.unmatched_enums[_key_unmatched_enums].to_dict() + _dict['unmatched_enums'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_global_vars (dict) + _field_dict = {} + if self.unmatched_global_vars: + for _key_unmatched_global_vars in self.unmatched_global_vars: + if self.unmatched_global_vars[_key_unmatched_global_vars]: + _field_dict[_key_unmatched_global_vars] = self.unmatched_global_vars[_key_unmatched_global_vars].to_dict() + _dict['unmatched_global_vars'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in fields (dict) _field_dict = {} if self.fields: @@ -157,6 +166,13 @@ def to_dict(self) -> Dict[str, Any]: if self.fields[_key_fields]: _field_dict[_key_fields] = self.fields[_key_fields].to_dict() _dict['fields'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_external_vars (dict) + _field_dict = {} + if self.unmatched_external_vars: + for _key_unmatched_external_vars in self.unmatched_external_vars: + if self.unmatched_external_vars[_key_unmatched_external_vars]: + _field_dict[_key_unmatched_external_vars] = self.unmatched_external_vars[_key_unmatched_external_vars].to_dict() + _dict['unmatched_external_vars'] = _field_dict return _dict @classmethod @@ -187,12 +203,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ) if obj.get("unmatched_functions") is not None else None, - "unmatched_external_vars": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_external_vars"].items() - ) - if obj.get("unmatched_external_vars") is not None - else None, "unmatched_custom_types": dict( (_k, InverseValue.from_dict(_v)) for _k, _v in obj["unmatched_custom_types"].items() @@ -229,6 +239,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ) if obj.get("unmatched_variadic_lists") is not None else None, + "unmatched_enums": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_enums"].items() + ) + if obj.get("unmatched_enums") is not None + else None, + "unmatched_global_vars": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_global_vars"].items() + ) + if obj.get("unmatched_global_vars") is not None + else None, "fields": dict( (_k, dict( (_ik, InverseValue.from_dict(_iv)) @@ -240,6 +262,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: for _k, _v in obj.get("fields").items() ) if obj.get("fields") is not None + else None, + "unmatched_external_vars": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_external_vars"].items() + ) + if obj.get("unmatched_external_vars") is not None else None }) return _obj diff --git a/test/test_base_response_get_ai_decompilation_task.py b/test/test_base_response_get_ai_decompilation_task.py index d98c1ab..4e5b655 100644 --- a/test/test_base_response_get_ai_decompilation_task.py +++ b/test/test_base_response_get_ai_decompilation_task.py @@ -61,13 +61,10 @@ def make_instance(self, include_optional) -> BaseResponseGetAiDecompilationTask: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_external_vars = { + unmatched_custom_types = { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_custom_types = { - 'key' : - }, unmatched_strings = { 'key' : }, @@ -83,10 +80,19 @@ def make_instance(self, include_optional) -> BaseResponseGetAiDecompilationTask: unmatched_variadic_lists = { 'key' : }, + unmatched_enums = { + 'key' : + }, + unmatched_global_vars = { + 'key' : + }, fields = { 'key' : { 'key' : } + }, + unmatched_external_vars = { + 'key' : }, ), summary = '', ai_summary = '', diff --git a/test/test_function_mapping_full.py b/test/test_function_mapping_full.py index a37fddb..a263235 100644 --- a/test/test_function_mapping_full.py +++ b/test/test_function_mapping_full.py @@ -49,10 +49,6 @@ def make_instance(self, include_optional) -> FunctionMappingFull: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_external_vars = { - 'key' : revengai.models.inverse_value.InverseValue( - value = '', ) - }, unmatched_custom_types = { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) @@ -77,11 +73,23 @@ def make_instance(self, include_optional) -> FunctionMappingFull: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, + unmatched_enums = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_global_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, fields = { 'key' : { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) } + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) } ) else: @@ -101,10 +109,6 @@ def make_instance(self, include_optional) -> FunctionMappingFull: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_external_vars = { - 'key' : revengai.models.inverse_value.InverseValue( - value = '', ) - }, unmatched_custom_types = { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) @@ -129,6 +133,14 @@ def make_instance(self, include_optional) -> FunctionMappingFull: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, + unmatched_enums = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_global_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, fields = { 'key' : { 'key' : revengai.models.inverse_value.InverseValue( diff --git a/test/test_get_ai_decompilation_task.py b/test/test_get_ai_decompilation_task.py index 8b0a911..cb777c3 100644 --- a/test/test_get_ai_decompilation_task.py +++ b/test/test_get_ai_decompilation_task.py @@ -59,13 +59,10 @@ def make_instance(self, include_optional) -> GetAiDecompilationTask: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_external_vars = { + unmatched_custom_types = { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_custom_types = { - 'key' : - }, unmatched_strings = { 'key' : }, @@ -81,10 +78,19 @@ def make_instance(self, include_optional) -> GetAiDecompilationTask: unmatched_variadic_lists = { 'key' : }, + unmatched_enums = { + 'key' : + }, + unmatched_global_vars = { + 'key' : + }, fields = { 'key' : { 'key' : } + }, + unmatched_external_vars = { + 'key' : }, ), summary = '', ai_summary = '', @@ -117,13 +123,10 @@ def make_instance(self, include_optional) -> GetAiDecompilationTask: 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_external_vars = { + unmatched_custom_types = { 'key' : revengai.models.inverse_value.InverseValue( value = '', ) }, - unmatched_custom_types = { - 'key' : - }, unmatched_strings = { 'key' : }, @@ -139,10 +142,19 @@ def make_instance(self, include_optional) -> GetAiDecompilationTask: unmatched_variadic_lists = { 'key' : }, + unmatched_enums = { + 'key' : + }, + unmatched_global_vars = { + 'key' : + }, fields = { 'key' : { 'key' : } + }, + unmatched_external_vars = { + 'key' : }, ), ) """