Bug 377720

Summary: Variable names in comments are highlighted
Product: [Developer tools] kdev-python Reporter: Vishesh Handa <me>
Component: generalAssignee: Sven Brauch <mail>
Status: RESOLVED FIXED    
Severity: normal CC: mail, mail
Priority: NOR    
Version: 5.0.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0

Description Vishesh Handa 2017-03-17 11:47:09 UTC
Example -

class Example:
    def __init__(self):
        self.producer = None

    def run(self):
        foo(None, self.producer)
        # Do we need to poll for the producer?

When placing the cursor over the word 'producer' in the comment, the variable in __init__ is highlighted. The variable is not highlighted in the call to foo.

Changing the value of the variable fixes it -

class Example:
    def __init__(self):
        self.producer = None

    def run(self):
        foo(None, self.producer)
        self.producer = None
        # Do we need to poll for the producer?
Comment 1 Sven Brauch 2017-03-17 17:05:39 UTC
Known issue, it's an edge case in the parser which is somehow hard to fix.
Comment 2 Francis Herne 2017-03-22 19:36:00 UTC
This is fixed in 5.1