Re: [PATCH v2] userdiff: support Python async functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Josh Holland <anowlcalledjosh@xxxxxxxxx> writes:

> This patch now includes tests for indented declarations, as well as the
> unindented versions which were present before.

Very much appreciated.

I wondered if something like

diff --git a/t/t4018/python-indented-async-def b/t/t4018/python-indented-async-def
index f5d03258af..567c1dafcb 100644
--- a/t/t4018/python-indented-async-def
+++ b/t/t4018/python-indented-async-def
@@ -1,3 +1,6 @@
+async def not_this_one(self):
+    return []
+
 class Foo:
     async def RIGHT(self, x: int):
         return [

would further help, but if a breakage makes us ignore a start of
definition that is indented, we would hit "class Foo:" you added
and notice such a breakage anyway, without additional definition
before it.  So I think what we see in this patch is good.

Thanks.

> ...
>  t/t4018/python-indented-async-def | 7 +++++++
> ...
> diff --git a/t/t4018/python-indented-async-def b/t/t4018/python-indented-async-def
> new file mode 100644
> index 000000000..f5d03258a
> --- /dev/null
> +++ b/t/t4018/python-indented-async-def
> @@ -0,0 +1,7 @@
> +class Foo:
> +    async def RIGHT(self, x: int):
> +        return [
> +            1,
> +            2,
> +            ChangeMe,
> +        ]
> ...



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux