Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.28.0
v2.32.0
4 changes: 3 additions & 1 deletion docs/FunctionMappingFull.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v2.28.0"
__version__ = "v2.32.0"

# Define package exports
__all__ = [
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
62 changes: 45 additions & 17 deletions revengai/models/function_mapping_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -150,13 +145,34 @@ 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:
for _key_fields in self.fields:
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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down
14 changes: 10 additions & 4 deletions test/test_base_response_get_ai_decompilation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' :
},
Expand All @@ -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 = '',
Expand Down
28 changes: 20 additions & 8 deletions test/test_function_mapping_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '', )
Expand All @@ -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:
Expand All @@ -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 = '', )
Expand All @@ -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(
Expand Down
28 changes: 20 additions & 8 deletions test/test_get_ai_decompilation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' :
},
Expand All @@ -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 = '',
Expand Down Expand Up @@ -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' :
},
Expand All @@ -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' :
}, ),
)
"""
Expand Down