Re: [PATCH v2] userdiff: support Python async functions
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,
> + ]
> ...