Jedi: PEP 526 support for instance fields

Created on 19 Jun 2017  路  2Comments  路  Source: davidhalter/jedi

I noticed that while there's support for PEP 526 for variables (#821), there's not for instance fields. Is this possible to add without to much hassle?

class Spam:
    arr: list

    def __init__(self, arr):
        self.arr = arr

    def foo(self):
        self.arr.<tab> # Does not autocomplete .append etc
        other: list
        other.<tab> # Does autocomplete like you would expect
feature

Most helpful comment

It's probably not too complicated.

All 2 comments

It's probably not too complicated.

I feel like this is working very well now. Also ensured it with a few additional tests. Please let me know if there are still issues.

Was this page helpful?
0 / 5 - 0 ratings