-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
Bug Report
I've noticed that overloading a function can hide a mismatch between the runtime type and the stub type. I noticed this as I was going over typeshed stubtest exceptions, specifically for itertools.accumulate.
Tests for python 3.6 and 3.7 failed because the stubs declared accumulate as a function while it was actually a class. However for 3.8 it is defined as two functions with overload and the tests passed successfully.
To Reproduce
(Write your steps here:)
- Run stubtest for typeshed in python 3.8.
- Test passes.
- Remove one of the overloads in itertools.pyi
- run again and see it fails.
Expected Behavior
I t should fail on a type mismatch like it does for no overloads.
Actual Behavior
passed.
Your Environment
Ran from latest python 3.8 and latest mypy from github.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong