X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/1747c388bba0c87f75a6239d56e3b51f7455e93d..385e3a10493c88dc2b71dc11d9d9799d7fcb3b27:/tests/function.py diff --git a/tests/function.py b/tests/function.py index a181212..4754588 100644 --- a/tests/function.py +++ b/tests/function.py @@ -85,11 +85,14 @@ def f( a, **kwargs, ) -> A: - return A( - very_long_argument_name1=very_long_value_for_the_argument, - very_long_argument_name2=very_long_value_for_the_argument, - **kwargs, + return ( + yield from A( + very_long_argument_name1=very_long_value_for_the_argument, + very_long_argument_name2=very_long_value_for_the_argument, + **kwargs, + ) ) +def __await__(): return (yield) # output @@ -164,11 +167,15 @@ def spaces2(result=_core.Value(None)): def example(session): - result = session.query(models.Customer.id).filter( - models.Customer.account_id == account_id, models.Customer.email == email_address - ).order_by( - models.Customer.id.asc() - ).all() + result = ( + session.query(models.Customer.id) + .filter( + models.Customer.account_id == account_id, + models.Customer.email == email_address, + ) + .order_by(models.Customer.id.asc()) + .all() + ) def long_lines(): @@ -224,8 +231,14 @@ def trailing_comma(): def f(a, **kwargs) -> A: - return A( - very_long_argument_name1=very_long_value_for_the_argument, - very_long_argument_name2=very_long_value_for_the_argument, - **kwargs, + return ( + yield from A( + very_long_argument_name1=very_long_value_for_the_argument, + very_long_argument_name2=very_long_value_for_the_argument, + **kwargs, + ) ) + + +def __await__(): + return (yield)