Git fork

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

+32 -1
+4
t/t4018/python-async-def
··· 1 + async def RIGHT(pi: int = 3.14): 2 + while True: 3 + break 4 + return ChangeMe()
+4
t/t4018/python-class
··· 1 + class RIGHT(int, str): 2 + # comment 3 + # another comment 4 + # ChangeMe
+4
t/t4018/python-def
··· 1 + def RIGHT(pi: int = 3.14): 2 + while True: 3 + break 4 + return ChangeMe()
+7
t/t4018/python-indented-async-def
··· 1 + class Foo: 2 + async def RIGHT(self, x: int): 3 + return [ 4 + 1, 5 + 2, 6 + ChangeMe, 7 + ]
+5
t/t4018/python-indented-class
··· 1 + if TYPE_CHECKING: 2 + class RIGHT: 3 + # comment 4 + # another comment 5 + # ChangeMe
+7
t/t4018/python-indented-def
··· 1 + class Foo: 2 + def RIGHT(self, x: int): 3 + return [ 4 + 1, 5 + 2, 6 + ChangeMe, 7 + ]
+1 -1
userdiff.c
··· 145 145 "[a-zA-Z_][a-zA-Z0-9_]*" 146 146 "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+" 147 147 "|[-+*/<>%&^|=!.]=|--|\\+\\+|<<=?|>>=?|===|&&|\\|\\||::|->"), 148 - PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$", 148 + PATTERNS("python", "^[ \t]*((class|(async[ \t]+)?def)[ \t].*)$", 149 149 /* -- */ 150 150 "[a-zA-Z_][a-zA-Z0-9_]*" 151 151 "|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"