mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Previously in docstrings we incorrectly recognized references in 'Attributes' section only as instance attribute references. It led to false positive 'Unresolved reference' on class attributes references in docstrings and wrong resolve when using class and instance attributes with the same names. Now we use ReferenceType.VARIABLE to identify both class and instance attribute references in 'Attributes' section and then resolve them with priority of instance attributes. Also fixed wrong resolve of attributes references to constructor parameters. GitOrigin-RevId: ea10bfb092472c0ab14b77f06efd93093cfcd684
9 lines
133 B
Python
9 lines
133 B
Python
from dataclasses import dataclass
|
|
|
|
@dataclass
|
|
class MyClass:
|
|
"""
|
|
:ivar var1: description
|
|
<ref>
|
|
"""
|
|
var1 = 0 |