This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 187823 - variable type hint is not module wide
Summary: variable type hint is not module wide
Status: CLOSED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Other
: P3 normal (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-19 09:21 UTC by nbphpuser
Modified: 2017-06-23 08:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
autocompletion offer (49.31 KB, image/png)
2010-06-19 09:21 UTC, nbphpuser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nbphpuser 2010-06-19 09:21:58 UTC
Created attachment 100240 [details]
autocompletion offer

Hello!

in example below type of variable log is not recognized, however it is specified

import logging
log = logging.getLogger('util')
log.setLevel(logging.DEBUG)
logging.basicConfig(format="%(name)s %(levelname)s: %(message)s")

# @type log Logger
log.info(msg) #here autocompletion works

class Foo:
    def __init__(self):
        log.             #here log type is not recognized see screenshot


another example:

class Foo:
    def __init__(self):
        # @type self.log Logger
        self.log = Logger()
        self.log.       #here log type is not recognized


However this works:

class Foo:
    def __init__(self):
        log = Logger()
        log.
Comment 1 Jenselme 2017-06-22 22:09:47 UTC
Completion is being reworked for the new release planed in August. Not sure it is still relevant with the current version. Type annotation support may be added later for Python 3. Closing this as old bug.
Comment 2 Jiri Kovalsky 2017-06-23 08:06:34 UTC
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.