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

Implement tracking variable values by location #682

Closed
MikhailArkhipov opened this issue Mar 1, 2019 · 0 comments
Closed

Implement tracking variable values by location #682

MikhailArkhipov opened this issue Mar 1, 2019 · 0 comments

Comments

@MikhailArkhipov
Copy link

For better intellisense we need to track variable assignment locations so in

x = 1
x. # yields completions for int
x = 's'
x. # yields completions for str

see also #668 for isinstance so

from typing import Union, List

class Foo: pass
class Bar: pass

FB = Union[Foo, List[Bar]]

def do(fb: FB):
    if isinstance(fb, list):
        fb. # completions for list
        return fb[0]
    else:
        fb. # completions for Foo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant