https://bugs.kde.org/show_bug.cgi?id=373850
Bug ID: 373850 Summary: Highlighting ranges often wrong for constructors/__call__()/indexing. Product: kdev-python Version: git master Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language support Assignee: m...@svenbrauch.de Reporter: m...@flherne.uk Target Milestone: --- In these cases, the magic-method's name doesn't appear in the code, so we highlight the opening paren or square-bracket. ``` mc = MyClass() # <- `(` links to MyClass.__init__ mc[2] # <- `[` links to MyClass.__getitem__ ``` In some cases, completely the wrong character is highlighted: ``` class MyClass: def __call__(self): return 12 def __getitem__(self, key): return 1.2 foo = {} foo['aaa'] = MyClass() bar = foo['aaa'][2] # First 'a' is highlighted instead of second '[' baz = foo['aaa'](2) # ')' is highlighted instead of '(' # Not sure why these behave differently ``` This seems particularly common after string literals. -- You are receiving this mail because: You are watching all bug changes.