We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is my code:
async def request( self, method: Text = "post", subpath: Optional[Text] = None, content_type: Optional[Text] = "application/json", return_method: Text = "json", **kwargs: Any ): """Send a HTTP request to the endpoint. All additional arguments will get passed through to aiohttp's `session.request`.""" # create the appropriate headers headers = {} if content_type: headers["Content-Type"] = content_type if "headers" in kwargs: headers.update(kwargs["headers"]) del kwargs["headers"] url = concat_url(self.url, subpath) async with self.session() as session: async with session.request( method, url, headers=headers, params=self.combine_parameters(kwargs), **kwargs ) as resp: if resp.status >= 400: raise ClientResponseError( resp.status, resp.reason, await resp.content.read() ) return await getattr(resp, return_method)()
The text was updated successfully, but these errors were encountered:
I have the same problem with all objects that I await and pass to a function in same expression, e.g.
max(await x())
or
l = [] l.append(await y())
If I put parentheses around awaited object, it will work, so:
max(await (x()))
l = [] l.append(await (y()))
doesn't raise this error.
Sorry, something went wrong.
Looks like the grammar in baron is ready but a redbaron wrapper is missing: https://baron.readthedocs.io/en/latest/grammar.html#async-with
Problem still exists to this date. Is there any update on this?
No branches or pull requests
here is my code:
The text was updated successfully, but these errors were encountered: