tests/check_new_syntax.py: check order of if statements (#6423)

This commit is contained in:
Akuli authored and GitHub committed 2021-11-28 08:04:46 -08:00
1 parent 6d54c10387
commit 2b702233c6
4 files changed
+25 -14

No files matched your search

+8 -8
View File
@@ -93,14 +93,7 @@ def isframe(object: object) -> TypeGuard[FrameType]: ...
def iscode(object: object) -> TypeGuard[CodeType]: ...
def isbuiltin(object: object) -> TypeGuard[BuiltinFunctionType]: ...
if sys.version_info < (3, 7):
def isroutine(
object: object,
) -> TypeGuard[FunctionType | LambdaType | MethodType | BuiltinFunctionType | BuiltinMethodType]: ...
def ismethoddescriptor(object: object) -> bool: ...
def ismemberdescriptor(object: object) -> bool: ...
else:
if sys.version_info >= (3, 7):
def isroutine(
object: object,
) -> TypeGuard[
@@ -116,6 +109,13 @@ else:
def ismethoddescriptor(object: object) -> TypeGuard[MethodDescriptorType]: ...
def ismemberdescriptor(object: object) -> TypeGuard[MemberDescriptorType]: ...
else:
def isroutine(
object: object,
) -> TypeGuard[FunctionType | LambdaType | MethodType | BuiltinFunctionType | BuiltinMethodType]: ...
def ismethoddescriptor(object: object) -> bool: ...
def ismemberdescriptor(object: object) -> bool: ...
def isabstract(object: object) -> bool: ...
def isgetsetdescriptor(object: object) -> TypeGuard[GetSetDescriptorType]: ...
def isdatadescriptor(object: object) -> TypeGuard[_SupportsSet[Any, Any] | _SupportsDelete[Any]]: ...