From: Johannes Sixt Date: Wed, 20 Nov 2019 06:48:55 GMT Subject: Re: [PATCH v2] userdiff: support Python async functions Message-ID: <7821ee2c-e778-5760-16d4-eba1a7b64400@kdbg.org> In-Reply-To: Am 20.11.19 um 04:59 schrieb Junio C Hamano: > Josh Holland 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. Good point raised and fine analysis! This patch is Acked-by: Johannes Sixt -- Hannes