diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:44 -0800 |
commit | 9502b616f187c567b93db69cd9c6f0028019bd15 (patch) | |
tree | 63c35ad83af6ad1ddc1059ce5132698d8e771530 /t | |
parent | Merge branch 'ec/fetch-mark-common-refs-trace2' (diff) | |
parent | userdiff: support Python async functions (diff) | |
download | tgif-9502b616f187c567b93db69cd9c6f0028019bd15.tar.xz |
Merge branch 'jh/userdiff-python-async'
The userdiff machinery has been taught that "async def" is another
way to begin a "function" in Python.
* jh/userdiff-python-async:
userdiff: support Python async functions
Diffstat (limited to 't')
-rw-r--r-- | t/t4018/python-async-def | 4 | ||||
-rw-r--r-- | t/t4018/python-class | 4 | ||||
-rw-r--r-- | t/t4018/python-def | 4 | ||||
-rw-r--r-- | t/t4018/python-indented-async-def | 7 | ||||
-rw-r--r-- | t/t4018/python-indented-class | 5 | ||||
-rw-r--r-- | t/t4018/python-indented-def | 7 |
6 files changed, 31 insertions, 0 deletions
diff --git a/t/t4018/python-async-def b/t/t4018/python-async-def new file mode 100644 index 0000000000..87640e03d2 --- /dev/null +++ b/t/t4018/python-async-def @@ -0,0 +1,4 @@ +async def RIGHT(pi: int = 3.14): + while True: + break + return ChangeMe() diff --git a/t/t4018/python-class b/t/t4018/python-class new file mode 100644 index 0000000000..ba9e741430 --- /dev/null +++ b/t/t4018/python-class @@ -0,0 +1,4 @@ +class RIGHT(int, str): + # comment + # another comment + # ChangeMe diff --git a/t/t4018/python-def b/t/t4018/python-def new file mode 100644 index 0000000000..e50b31b0ad --- /dev/null +++ b/t/t4018/python-def @@ -0,0 +1,4 @@ +def RIGHT(pi: int = 3.14): + while True: + break + return ChangeMe() 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, + ] diff --git a/t/t4018/python-indented-class b/t/t4018/python-indented-class new file mode 100644 index 0000000000..19b4f35c4c --- /dev/null +++ b/t/t4018/python-indented-class @@ -0,0 +1,5 @@ +if TYPE_CHECKING: + class RIGHT: + # comment + # another comment + # ChangeMe diff --git a/t/t4018/python-indented-def b/t/t4018/python-indented-def new file mode 100644 index 0000000000..208fbadd2b --- /dev/null +++ b/t/t4018/python-indented-def @@ -0,0 +1,7 @@ +class Foo: + def RIGHT(self, x: int): + return [ + 1, + 2, + ChangeMe, + ] |