GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — fix: Remove None-related special-casing during inference with literal contexts by edgarrmondragon · Pull Request #22351 · python/mypy Conversation
|
|
Sorry, but I think this is (very) wrong. IMO this issue should be solved by removing (FWIW I verified my idea locally and it works, but there is also primer...) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Ok, thanks for taking a look 🙇♂️. Removing the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7f62eeb to
0eb0c1d
Compare
… contexts Signed-off-by: Edgar Ramírez Mondragón <[email protected]>
0eb0c1d to
c353380
Compare
|
Diff from mypy_primer, showing the effect of this PR on open source code: scrapy (https://github.com/scrapy/scrapy) + tests/test_crawler.py:230: error: Unused "type: ignore" comment [unused-ignore] + tests/test_crawler.py:230: error: Argument 1 to "get_addon" of "Crawler" has incompatible type "type[DefaultSpider]"; expected "type[TrackingAddon] | type[None]" [arg-type] + tests/test_crawler.py:230: note: Error code "arg-type" not covered by "type: ignore[assignment]" comment + tests/test_crawler.py:233: error: Argument 1 to "get_addon" of "Crawler" has incompatible type "type[ParentAddon]"; expected "type[TrackingAddon] | type[None]" [arg-type] discord.py (https://github.com/Rapptz/discord.py) + discord/state.py:525: error: Item "None" of "Message | None" has no attribute "id" [union-attr] + discord/message.py:576: error: Item "None" of "Message | None" has no attribute "created_at" [union-attr] + discord/message.py:577: error: Item "None" of "Message | None" has no attribute "edited_at" [union-attr] + discord/message.py:578: error: Item "None" of "Message | None" has no attribute "content" [union-attr] + discord/message.py:579: error: Item "None" of "Message | None" has no attribute "embeds" [union-attr] + discord/message.py:580: error: Item "None" of "Message | None" has no attribute "components" [union-attr] + discord/message.py:581: error: Item "None" of "Message | None" has no attribute "stickers" [union-attr] + discord/message.py:582: error: Item "None" of "Message | None" has no attribute "attachments" [union-attr] + discord/message.py:583: error: Item "None" of "Message | None" has no attribute "flags" [union-attr] - discord/ext/commands/converter.py:269: error: Incompatible types in assignment (expression has type "Member | User | None", variable has type "Member | None") [assignment] + discord/ext/commands/converter.py:269: error: Argument 1 has incompatible type "list[User | Member]"; expected "Iterable[Member | None]" [arg-type] + discord/ext/commands/converter.py:321: error: Argument 1 has incompatible type "list[User | Member]"; expected "Iterable[User | None]" [arg-type] + discord/ext/commands/converter.py:328: error: Unused "type: ignore" comment [unused-ignore] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Sentinel and enum type merge issues with generic
There was an error while loading. Please reload this page.