KotlinIsland / basedtypeshed

Collection of library stubs for Python, with static types
Other
3 stars 0 forks source link

Callable types from `types` are broken #17

Closed DetachHead closed 2 years ago

DetachHead commented 2 years ago
> mypy --custom-typeshed-dir . --no-silence-site-packages --pretty -c=
stdlib/types.pyi:186: error: Invalid base class "Callable"
    class FunctionType(Callable):
                       ^
stdlib/types.pyi:467: error: Invalid base class "Callable"
    class MethodType(Callable):
                     ^
stdlib/types.pyi:484: error: Invalid base class "Callable"
    class BuiltinFunctionType(Callable):
                              ^
stdlib/types.pyi:497: error: Invalid base class "Callable"
        class WrapperDescriptorType(Callable):
                                    ^
stdlib/types.pyi:508: error: Invalid base class "Callable"
        class MethodWrapperType(Callable):
                                ^
stdlib/types.pyi:522: error: Invalid base class "Callable"
        class MethodDescriptorType(Callable):
                                   ^
stdlib/types.pyi:533: error: Invalid base class "Callable"
        class ClassMethodDescriptorType(Callable):
                                        ^
Found 7 errors in 1 file (checked 1 source file)

Because types.FunctionType extends typing.Callable 🙄

KotlinIsland commented 2 years ago

What I was trying to do there was a pitiful attempt anyway, I just reverted it