summaryrefslogtreecommitdiff
path: root/t/t4018/python-indented-async-def
diff options
context:
space:
mode:
authorLibravatar Josh Holland <anowlcalledjosh@gmail.com>2019-11-19 15:08:10 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-20 16:31:43 +0900
commit077a1fda82b237c16eb10bd988650468683a94b5 (patch)
tree3dc2a504b62249c0b4a7336a58d4e9dccee14660 /t/t4018/python-indented-async-def
parentGit 2.23 (diff)
downloadtgif-077a1fda82b237c16eb10bd988650468683a94b5.tar.xz
userdiff: support Python async functions
Python's async functions (declared with "async def" rather than "def") were not being displayed in hunk headers. This commit teaches git about the async function syntax, and adds tests for the Python userdiff regex. Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/python-indented-async-def')
-rw-r--r--t/t4018/python-indented-async-def7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t4018/python-indented-async-def b/t/t4018/python-indented-async-def
new file mode 100644
index 0000000000..f5d03258af
--- /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,
+ ]