]> git.madduck.net Git - etc/vim.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Remove redundant parentheses around awaited coroutines/tasks (#2991)
authorJoe Young <80432516+jpy-git@users.noreply.github.com>
Sat, 9 Apr 2022 20:49:40 +0000 (21:49 +0100)
committerGitHub <noreply@github.com>
Sat, 9 Apr 2022 20:49:40 +0000 (16:49 -0400)
commit75f99bded33abe962ca08bf16c77635ac9ca00a1
tree3ddc3acb678cb53d42ccb6ec12cdf86a4d4de227
parent98fcccee55acba04afdd933676f56927cfe9bbe4
Remove redundant parentheses around awaited coroutines/tasks (#2991)

This is a tricky one as await is technically an expression and therefore
in certain situations requires brackets for operator precedence.
However, the vast majority of await usage is just await some_coroutine(...)
and similar in format to return statements. Therefore this PR removes
redundant parens around these await expressions.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
CHANGES.md
src/black/linegen.py
tests/data/remove_await_parens.py [new file with mode: 0644]
tests/test_format.py