Skip to content

Commit

Permalink
Use _construct_response in AsyncClient._make_request
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Oct 28, 2022
1 parent 16d51b7 commit 9983735
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tweepy/asynchronous/client.py
Expand Up @@ -155,16 +155,7 @@ async def _make_request(
if self.return_type is dict:
return response

data = response.get("data")
data = self._process_data(data, data_type=data_type)

includes = response.get("includes", {})
includes = self._process_includes(includes)

errors = response.get("errors", [])
meta = response.get("meta", {})

return Response(data, includes, errors, meta)
return self._construct_response(response, data_type=data_type)


class AsyncClient(AsyncBaseClient):
Expand Down

0 comments on commit 9983735

Please sign in to comment.