IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

Type Hint for `DetailedResponse.get_result()` is incorrect. #145

Closed rhyshort closed 2 years ago

rhyshort commented 2 years ago

Describe the bug

To Reproduce

https://github.com/IBM/python-sdk-core/blob/2c027cb8689ba8bb997fb4cdd3201e68674d27a8/ibm_cloud_sdk_core/detailed_response.py#L46 lists the return value as requests.Response however the documentation for methods in the library such as post_view: https://github.com/IBM/cloudant-python-sdk/blob/master/ibmcloudant/cloudant_v1.py#L3030 and the code in the core sdk (https://github.com/IBM/python-sdk-core/blob/2c027cb8689ba8bb997fb4cdd3201e68674d27a8/ibm_cloud_sdk_core/base_service.py#L322-L325) shows a parsed json object as one of the options for the result value.

Expected behavior

Type hints to correctly indicate which type(s) can be returned from DetailedResponse.get_result()

Screenshots

Must gather (please complete the following information):

Additional context

ricellis commented 2 years ago

Transferred in as the DetailedResponse is defined here.

Additional info the Cloudant SDK v0.1.3 is using: ibm_cloud_sdk_core==3.15.1 and used generator version 3.49.0

ibm-devx-sdk commented 1 year ago

:tada: This issue has been resolved in version 3.16.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: