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
ruff --select SIM108 --fix
class JSONRPC(BaseComponent): def _on_request(self, event, req, res): if isinstance(params, dict): value = yield self.call(rpc.create(method, **params), self.rpc_channel) else: value = yield self.call(rpc.create(method, *params), self.rpc_channel)
The text was updated successfully, but these errors were encountered:
Oho!
Sorry, something went wrong.
with await it seems not to be a syntax error (but looks strange):
await
$ ruff --select SIM108 --fix --diff foo.py --- foo.py +++ foo.py @@ -1,7 +1,4 @@ class JSONRPC(BaseComponent): async def _on_request(self, event, req, res): - if isinstance(params, dict): - value = await self.call(rpc.create(method, **params), self.rpc_channel) - else: - value = await self.call(rpc.create(method, *params), self.rpc_channel) + value = await self.call(rpc.create(method, **params), self.rpc_channel) if isinstance(params, dict) else await self.call(rpc.create(method, *params), self.rpc_channel)
Disabling for now, for yield and awaits. Need to fix the underlying bug.
charliermarsh
Successfully merging a pull request may close this issue.
ruff --select SIM108 --fix
The text was updated successfully, but these errors were encountered: