python-keycloak-client icon indicating copy to clipboard operation
python-keycloak-client copied to clipboard

Faulty rtype in docstring

Open schwobaseggl opened this issue 4 years ago • 0 comments

The rtype annotation in KeycloakUMA.resource_set_create is wrong, or at least incomplete. It indicates that the return value will be a str when KeycloakClient._handle_response tries to return a deserialized json object.

This can be confusing/annoying when you try to maintain proper type annotations in a large project and your IDE tells you something is wrong. The UMA specs for that particular endpoint also state that the response should be some json with an "_id" key which (translated to Python) the function does return.

schwobaseggl avatar Jan 19 '21 17:01 schwobaseggl