Browse Source
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>maint
Josh Holland
5 years ago
committed by
Junio C Hamano
7 changed files with 32 additions and 1 deletions
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
async def RIGHT(pi: int = 3.14): |
||||
while True: |
||||
break |
||||
return ChangeMe() |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
class RIGHT(int, str): |
||||
# comment |
||||
# another comment |
||||
# ChangeMe |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
def RIGHT(pi: int = 3.14): |
||||
while True: |
||||
break |
||||
return ChangeMe() |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
class Foo: |
||||
async def RIGHT(self, x: int): |
||||
return [ |
||||
1, |
||||
2, |
||||
ChangeMe, |
||||
] |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
if TYPE_CHECKING: |
||||
class RIGHT: |
||||
# comment |
||||
# another comment |
||||
# ChangeMe |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
class Foo: |
||||
def RIGHT(self, x: int): |
||||
return [ |
||||
1, |
||||
2, |
||||
ChangeMe, |
||||
] |
Loading…
Reference in new issue