git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2019, 03:59 UTC
Message-ID
<xmqqeey3ci61.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191119150807.8206-1-anowlcalledjosh@gmail.com>
Josh Holland <anowlcalledjosh@gmail.com> 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,
> +        ]
> ...
Previous: Josh HollandNext: Johannes Sixt
Message 2 of 3 in “userdiff: support Python async functions”
  1. userdiff: support Python async functionsJosh Holland, Nov 19, 2019
  2. Junio C HamanoNov 20, 2019
  3. Johannes SixtNov 20, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.