parent
92b377556e
commit
df7aacb43e
@ -298,6 +298,9 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md).
|
|||||||
* don't omit whitespace if the previous factor leaf wasn't a math
|
* don't omit whitespace if the previous factor leaf wasn't a math
|
||||||
operator (#55)
|
operator (#55)
|
||||||
|
|
||||||
|
* omit extra space in kwarg unpacking if it's the first argument (#46)
|
||||||
|
|
||||||
|
|
||||||
### 18.3a3
|
### 18.3a3
|
||||||
|
|
||||||
* don't remove single empty lines outside of bracketed expressions
|
* don't remove single empty lines outside of bracketed expressions
|
||||||
|
13
black.py
13
black.py
@ -867,21 +867,22 @@ def whitespace(leaf: Leaf) -> str: # noqa C901
|
|||||||
|
|
||||||
if prevp.type == token.EQUAL:
|
if prevp.type == token.EQUAL:
|
||||||
if prevp.parent and prevp.parent.type in {
|
if prevp.parent and prevp.parent.type in {
|
||||||
syms.typedargslist,
|
|
||||||
syms.varargslist,
|
|
||||||
syms.parameters,
|
|
||||||
syms.arglist,
|
syms.arglist,
|
||||||
syms.argument,
|
syms.argument,
|
||||||
|
syms.parameters,
|
||||||
|
syms.typedargslist,
|
||||||
|
syms.varargslist,
|
||||||
}:
|
}:
|
||||||
return NO
|
return NO
|
||||||
|
|
||||||
elif prevp.type == token.DOUBLESTAR:
|
elif prevp.type == token.DOUBLESTAR:
|
||||||
if prevp.parent and prevp.parent.type in {
|
if prevp.parent and prevp.parent.type in {
|
||||||
|
syms.arglist,
|
||||||
|
syms.argument,
|
||||||
|
syms.dictsetmaker,
|
||||||
|
syms.parameters,
|
||||||
syms.typedargslist,
|
syms.typedargslist,
|
||||||
syms.varargslist,
|
syms.varargslist,
|
||||||
syms.parameters,
|
|
||||||
syms.arglist,
|
|
||||||
syms.dictsetmaker,
|
|
||||||
}:
|
}:
|
||||||
return NO
|
return NO
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
call(arg, another, kwarg='hey', **kwargs)
|
call(arg, another, kwarg='hey', **kwargs)
|
||||||
call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs) # note: no trailing comma pre-3.6
|
call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs) # note: no trailing comma pre-3.6
|
||||||
call(*gidgets[:2])
|
call(*gidgets[:2])
|
||||||
|
call(**self.screen_kwargs)
|
||||||
lukasz.langa.pl
|
lukasz.langa.pl
|
||||||
call.me(maybe)
|
call.me(maybe)
|
||||||
1 .real
|
1 .real
|
||||||
@ -237,6 +238,7 @@ async def f():
|
|||||||
**kwargs
|
**kwargs
|
||||||
) # note: no trailing comma pre-3.6
|
) # note: no trailing comma pre-3.6
|
||||||
call(*gidgets[:2])
|
call(*gidgets[:2])
|
||||||
|
call(**self.screen_kwargs)
|
||||||
lukasz.langa.pl
|
lukasz.langa.pl
|
||||||
call.me(maybe)
|
call.me(maybe)
|
||||||
1 .real
|
1 .real
|
||||||
|
Loading…
Reference in New Issue
Block a user