kamahen / pykythe

Generate code Python source cross-reference facts in Kythe format
Other
21 stars 3 forks source link

Handle isinstance as a variant of type annotation #25

Open kamahen opened 4 years ago

kamahen commented 4 years ago

Somewhat related to issue #14.

Need to handle:

if isinstance(foo, int):
    foo += 1
if isinstance(foo, str):
    foo += 'abc'

Also need to handle type comments, even though they're obsolete in a sense:

x: int
x = mumble()  # type: int