-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce error category [unsafe-overload] #16061
Conversation
There were ~158 failed tests on local due to mismatch with |
This comment has been minimized.
This comment has been minimized.
closing and reopening to trigger a new run of mypy_primer; there was a flaky error on the latest run |
This comment has been minimized.
This comment has been minimized.
@AlexWaygood Seems like tests pass now. I had to remove again the hyperlink I added to the error message. f"Overloaded function signatures {index1} and {index2} overlap with incompatible return types" or is the following better? (would require fixing tests) f"Overloaded function signatures {index1} and {index2} overlap with incompatible return types."
" See https://mypy.readthedocs.io/en/stable/more_types.html#type-checking-the-variants", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only projects that have --warn-unused-ignores
enabled in their mypy configs will get this error; projects can always switch that option off temporarily if they find this change to be too disruptive:
Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
I had to remove again the hyperlink I added to the error message.
Having the hyperlink in the error message would be a pretty nice usability improvement, but I can imagine it would require a lot of tests to be updated. I think it would be okay to defer adding the hyperlink to a followup PR. Note though that you can also use pytest --update-data
to automate making most of the required updates to mypy's test cases.
Co-authored-by: Alex Waygood <[email protected]>
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/base.py:1318: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
mypy (https://github.com/python/mypy)
+ mypy/types.py:3022: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
steam.py (https://github.com/Gobot1234/steam.py)
- steam/ext/commands/commands.py:931: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ steam/ext/commands/commands.py:931: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
aioredis (https://github.com/aio-libs/aioredis)
+ aioredis/utils.py:45: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- pandas-stubs/core/strings.pyi:44: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/strings.pyi:44: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:162: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:162: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:177: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:222: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:235: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:245: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:255: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:268: error: Overloaded function signatures 5 and 7 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:268: error: Overloaded function signatures 5 and 7 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:540: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:553: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:553: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:566: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:566: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:579: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:579: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:645: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:671: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:671: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:704: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:840: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:848: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:848: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:865: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:865: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:881: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:881: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:1175: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 4 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 4 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 5 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 5 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1182: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 5 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 5 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1189: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1196: error: Overloaded function signatures 4 and 5 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1196: error: Overloaded function signatures 4 and 5 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1196: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1196: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:1203: error: Overloaded function signatures 5 and 6 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1203: error: Overloaded function signatures 5 and 6 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:1466: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:1498: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:1509: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:1523: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:1532: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:1538: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:1538: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
+ pandas-stubs/core/series.pyi:1556: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ pandas-stubs/core/series.pyi:1924: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
- pandas-stubs/core/series.pyi:2006: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:2006: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:2045: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:2045: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- pandas-stubs/core/series.pyi:2047: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ pandas-stubs/core/series.pyi:2047: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
... (truncated 362 lines) ...
pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/mark/structures.py:344: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
operator (https://github.com/canonical/operator)
- ops/pebble.py:2163: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ ops/pebble.py:2163: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- ops/model.py:2455: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ ops/model.py:2455: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
jax (https://github.com/google/jax)
- jax/_src/numpy/lax_numpy.py:1062: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ jax/_src/numpy/lax_numpy.py:1062: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/spider.py:37: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/embed/standalone.py:137: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ src/bokeh/embed/standalone.py:144: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ src/bokeh/embed/standalone.py:151: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:44: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 5 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 5 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:65: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:86: error: Overloaded function signatures 3 and 5 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:86: error: Overloaded function signatures 3 and 5 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:86: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:86: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:107: error: Overloaded function signatures 4 and 5 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:107: error: Overloaded function signatures 4 and 5 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:107: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:107: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:129: error: Overloaded function signatures 5 and 8 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:129: error: Overloaded function signatures 5 and 8 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:129: error: Overloaded function signatures 5 and 9 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:129: error: Overloaded function signatures 5 and 9 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:150: error: Overloaded function signatures 6 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:150: error: Overloaded function signatures 6 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:150: error: Overloaded function signatures 6 and 9 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:150: error: Overloaded function signatures 6 and 9 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:172: error: Overloaded function signatures 7 and 9 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:172: error: Overloaded function signatures 7 and 9 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:193: error: Overloaded function signatures 8 and 9 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:193: error: Overloaded function signatures 8 and 9 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:270: error: Overloaded function signatures 1 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:290: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:290: error: Overloaded function signatures 2 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:290: error: Overloaded function signatures 2 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:290: error: Overloaded function signatures 2 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:310: error: Overloaded function signatures 3 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:330: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:330: error: Overloaded function signatures 4 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:330: error: Overloaded function signatures 4 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:330: error: Overloaded function signatures 4 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:351: error: Overloaded function signatures 5 and 6 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:351: error: Overloaded function signatures 5 and 6 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:351: error: Overloaded function signatures 5 and 7 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:351: error: Overloaded function signatures 5 and 7 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:373: error: Overloaded function signatures 6 and 9 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:373: error: Overloaded function signatures 6 and 9 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:373: error: Overloaded function signatures 6 and 10 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:373: error: Overloaded function signatures 6 and 10 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:394: error: Overloaded function signatures 7 and 8 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:394: error: Overloaded function signatures 7 and 8 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:394: error: Overloaded function signatures 7 and 10 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:394: error: Overloaded function signatures 7 and 10 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:416: error: Overloaded function signatures 8 and 10 overlap with incompatible return types [misc]
+ src/hydra_zen/typing/_builds_overloads.py:416: error: Overloaded function signatures 8 and 10 overlap with incompatible return types [unsafe-overload]
- src/hydra_zen/typing/_builds_overloads.py:437: error: Overloaded function signatures 9 and 10 overlap with incompatible return types [misc]
... (truncated 43 lines) ...
streamlit (https://github.com/streamlit/streamlit)
+ lib/streamlit/elements/widgets/multiselect.py:64: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ lib/streamlit/delta_generator.py:430: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
+ lib/streamlit/delta_generator.py:978: error: Unused "type: ignore" comment, use narrower [unsafe-overload] instead of [misc] code [unused-ignore]
discord.py (https://github.com/Rapptz/discord.py)
- discord/state.py:1191: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ discord/state.py:1191: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:291: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:291: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:295: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:295: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1351: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1351: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1355: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1355: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1678: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1678: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1682: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1682: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1859: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1859: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:1863: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:1863: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:2378: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:2378: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [unsafe-overload]
- discord/channel.py:2382: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [misc]
+ discord/channel.py:2382: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [unsafe-overload]
- discord/app_commands/tree.py:577: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [misc]
+ discord/app_commands/tree.py:577: error: Overloaded function signatures 1 and 4 overlap with incompatible return types [unsafe-overload]
- discord/app_commands/tree.py:586: error: Overloaded function signatures 2 and 4 overlap with incompatible return types [misc]
+ discord/app_commands/tree.py:586: error: Overloaded function signatures 2 and 4 overlap with incompatible return types [unsafe-overload]
- discord/app_commands/tree.py:595: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [misc]
+ discord/app_commands/tree.py:595: error: Overloaded function signatures 3 and 4 overlap with incompatible return types [unsafe-overload]
- discord/ext/commands/core.py:1729: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ discord/ext/commands/core.py:1729: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
- discord/ext/commands/core.py:1799: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]
+ discord/ext/commands/core.py:1799: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [unsafe-overload]
|
Ah @randolf-scholz it looks like the docs build is now failing on Would you mind creating a new PR to add some docs to |
- python#16061 added a new error code, but didn't add any docs for the new error code - Because nothing in the `docs/` directory was modified, the docs CI job didn't run on that PR - Now the docs build is failing on `master` because we have an error code without any documentation: https://github.com/python/mypy/actions/runs/6112378542/job/16589719563
Can we also name this |
1. #16061 added a new error code, but didn't add any docs for the new error code 2. Because nothing in the `docs/` directory was modified, the docs CI job didn't run on that PR 3. Now the docs build is failing on `master` because we have an error code without any documentation: https://github.com/python/mypy/actions/runs/6112378542/job/16589719563
A new error code was introduced in python#16061 As per python#16068, we didn't previously run doc builds on changes to errorcodes.py, causing tests to fail on master when this was merged. Renaming the code as per: python#16061 (comment) All type ignores should be unsafe, so we should save the unsafe adjective for things that are really unsafe. As it stands, there are many cases where overloads overlap somewhat benignly.
A new error code was introduced in #16061 As per #16068, we didn't previously run doc builds on changes to errorcodes.py, causing tests to fail on master when this was merged. Renaming the code as per: #16061 (comment) All type ignores should be unsafe, so we should save the unsafe adjective for things that are really unsafe. As it stands, there are many cases where overloads overlap somewhat benignly. Fixes #8656
fixes #16060
codes.UNSAFE_OVERLOAD
[unsafe-overload]
Notes:
mypy
source code,types/get_proper_types
needed a modified type-ignore.