How can i use autocomplete in IDE in this case in python
<pre><code>class Event(object):
    can_i_autocomplete_this = True

class App(object):
    def decorator(self, func):
        self.func = func
    def call():
        self.func(Event())

app = App()

@app.decorator
def hello(something):
   print(something.can_i_autocomplete_this)

app.call()
</code></pre>

<p>I use decorator like this.
but in this case, <code>something</code> parameter in hello method autocomplete doesn't work in IDE(pycharm). (must support python 2.7)</p>

<p>how can i use autocomplete in this case?</p>

<p>thank you.</p>

<p>Usages of function are not analyzed in inferring types of  parameters.</p>

<p>You could specify type of parameter inside doc:</p>

<pre><code>@app.decorator
def hello(something):
    """
    :param something:
    :type something: Event
    :return:
    """
    print(something.can_i_autocomplete_this)
</code></pre>

<p>or using type hinting syntax (since Python 3.5):</p>

<pre><code>@app.decorator
def hello(something: Event):
    print(something.can_i_autocomplete_this)
</code></pre>

python autocomplete pycharm python-decorators