зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
9502b616f1
|
@ -0,0 +1,4 @@
|
||||||
|
async def RIGHT(pi: int = 3.14):
|
||||||
|
while True:
|
||||||
|
break
|
||||||
|
return ChangeMe()
|
|
@ -0,0 +1,4 @@
|
||||||
|
class RIGHT(int, str):
|
||||||
|
# comment
|
||||||
|
# another comment
|
||||||
|
# ChangeMe
|
|
@ -0,0 +1,4 @@
|
||||||
|
def RIGHT(pi: int = 3.14):
|
||||||
|
while True:
|
||||||
|
break
|
||||||
|
return ChangeMe()
|
|
@ -0,0 +1,7 @@
|
||||||
|
class Foo:
|
||||||
|
async def RIGHT(self, x: int):
|
||||||
|
return [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
ChangeMe,
|
||||||
|
]
|
|
@ -0,0 +1,5 @@
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
class RIGHT:
|
||||||
|
# comment
|
||||||
|
# another comment
|
||||||
|
# ChangeMe
|
|
@ -0,0 +1,7 @@
|
||||||
|
class Foo:
|
||||||
|
def RIGHT(self, x: int):
|
||||||
|
return [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
ChangeMe,
|
||||||
|
]
|
|
@ -145,7 +145,7 @@ PATTERNS("php",
|
||||||
"[a-zA-Z_][a-zA-Z0-9_]*"
|
"[a-zA-Z_][a-zA-Z0-9_]*"
|
||||||
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
|
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
|
||||||
"|[-+*/<>%&^|=!.]=|--|\\+\\+|<<=?|>>=?|===|&&|\\|\\||::|->"),
|
"|[-+*/<>%&^|=!.]=|--|\\+\\+|<<=?|>>=?|===|&&|\\|\\||::|->"),
|
||||||
PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$",
|
PATTERNS("python", "^[ \t]*((class|(async[ \t]+)?def)[ \t].*)$",
|
||||||
/* -- */
|
/* -- */
|
||||||
"[a-zA-Z_][a-zA-Z0-9_]*"
|
"[a-zA-Z_][a-zA-Z0-9_]*"
|
||||||
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
|
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче