]>
git.madduck.net Git - etc/vim.git/blobdiff - src/black/lines.py
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:
is_multiline_string,
is_one_sequence_between,
is_type_comment,
is_multiline_string,
is_one_sequence_between,
is_type_comment,
+ is_with_or_async_with_ stmt,
replace_child,
syms,
whitespace,
replace_child,
syms,
whitespace,
return bool(self) and is_import(self.leaves[0])
@property
return bool(self) and is_import(self.leaves[0])
@property
- def is_with_stmt(self) -> bool:
+ def is_with_or_async_with_ stmt(self) -> bool:
"""Is this a with_stmt line?"""
"""Is this a with_stmt line?"""
- return bool(self) and is_with_stmt(self.leaves[0])
+ return bool(self) and is_with_or_async_with_ stmt(self.leaves[0])
@property
def is_class(self) -> bool:
@property
def is_class(self) -> bool:
if (
Preview.wrap_multiple_context_managers_in_parens in line.mode
and max_priority == COMMA_PRIORITY
if (
Preview.wrap_multiple_context_managers_in_parens in line.mode
and max_priority == COMMA_PRIORITY
- and rhs.head.is_with_stmt
+ and rhs.head.is_with_or_async_with_ stmt
):
# For two context manager with statements, the optional parentheses read
# better. In this case, `rhs.body` is the context managers part of
):
# For two context manager with statements, the optional parentheses read
# better. In this case, `rhs.body` is the context managers part of