Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Fix None inside of [] in type hints #442

Closed
jakebailey opened this issue Dec 1, 2018 · 0 comments
Closed

Fix None inside of [] in type hints #442

jakebailey opened this issue Dec 1, 2018 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jakebailey
Copy link
Member

Something like this warns about use-before-def on None:

from typing import Generator

def fun() -> Generator[int, None, None]:
    yield from range(10)

None needs to be added early like True and False, as per comments in #429.

Making a separate issue from #391 to better distinguish the two separate bugs.

@jakebailey jakebailey self-assigned this Dec 1, 2018
@jakebailey jakebailey added the bug Something isn't working label Dec 3, 2018
@jakebailey jakebailey added this to the Dec 2018.1 milestone Dec 3, 2018
jakebailey added a commit that referenced this issue Dec 3, 2018
Fixes #442.
Replaces #429, which only masks the underlying True/False bug in #391.

I also removed the hack in #336 which checked for `ConstantExpression`.
jakebailey added a commit to jakebailey/python-language-server that referenced this issue Nov 1, 2019
Fixes microsoft#442.
Replaces microsoft#429, which only masks the underlying True/False bug in microsoft#391.

I also removed the hack in microsoft#336 which checked for `ConstantExpression`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant