mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Added error code for overlapping function signatures

Open katconnors opened this issue 1 year ago • 6 comments

Closes #17570. This is my first contribution to mypy! 🐍 Added an error code for overlapping function signatures. Test in check-errorcodes.test is a derivative of this post: https://stackoverflow.com/q/69341607

katconnors avatar Jul 26 '24 21:07 katconnors

mypy_primer (2) timed out- wonder if it had the same issue as here: https://github.com/python/mypy/pull/17588#issuecomment-2253537869

katconnors avatar Jul 29 '24 20:07 katconnors

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]

AutoSplit (https://github.com/Toufool/AutoSplit)
+ typings/cv2/__init__.pyi:2232:5: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2655:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2720:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2743:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2771:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2846:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2858:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2878:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2904:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:2930:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3144:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3240:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3249:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3251:5: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3258:5: error: Overloaded function signature 4 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3258:5: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3258:5: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3336:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3367:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3371:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3435:5: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3488:5: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3504:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3521:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3531:5: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3624:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:3847:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:4286:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:4478:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:4758:5: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:4832:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5073:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5183:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5438:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5451:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5576:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:5703:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6009:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6046:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6059:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6079:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6127:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6131:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6308:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6463:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6495:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6695:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6804:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6840:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6858:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6876:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6899:1: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ typings/cv2/__init__.pyi:6926:1: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]

... (truncated 52 lines) ...

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas-stubs/io/excel/_base.pyi:123: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ pandas-stubs/io/excel/_base.pyi:123: note: Error code "overloaded-function-matching" not covered by "type: ignore" comment

discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [overloaded-function-matching]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment  [unused-ignore]
+ pandera/schema_inference/pandas.py:25: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
+ pandera/schema_inference/pandas.py:25: note: Error code "overloaded-function-matching" not covered by "type: ignore" comment

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]

antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]

github-actions[bot] avatar Jul 29 '24 21:07 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [overloaded-function-matching]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment, use narrower [overloaded-function-matching] instead of [misc] code  [unused-ignore]

discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [overloaded-function-matching]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [overloaded-function-matching]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]
- src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overloaded-function-matching]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment, use narrower [overloaded-function-matching] instead of [misc] code  [unused-ignore]

antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overloaded-function-matching]

github-actions[bot] avatar Jul 30 '24 00:07 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [overload-cannot-match]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/utilities/asyncutils.py:329: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]

github-actions[bot] avatar Jul 30 '24 05:07 github-actions[bot]

@JelleZijlstra made the requested changes, if you don't mind taking another look. Thanks in advance!

katconnors avatar Aug 06 '24 23:08 katconnors

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:330: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:464: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:468: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [overload-cannot-match]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/client/schemas/objects.py:178: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]

github-actions[bot] avatar Aug 14 '24 03:08 github-actions[bot]

Gentle reminder for review, @JelleZijlstra or @AlexWaygood. Thanks both!

katconnors avatar Sep 13 '24 21:09 katconnors

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader  [overload-cannot-match]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:338: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:338: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:472: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:472: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader  [overload-cannot-match]
- pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [misc]
+ pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader  [overload-cannot-match]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code  [unused-ignore]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]
- src/prefect/client/schemas/objects.py:196: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]
+ src/prefect/client/schemas/objects.py:196: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [overload-cannot-match]

antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [overload-cannot-match]

github-actions[bot] avatar Sep 13 '24 23:09 github-actions[bot]

Looks like checks have passed, and this can be merged when someone has time.

katconnors avatar Sep 18 '24 21:09 katconnors