Highlight attrs attributes lacking type annotation (PY-26354)

This commit is contained in:
Semyon Proshev
2018-05-29 16:50:02 +03:00
parent 35dffdcbc3
commit 574a485508
4 changed files with 48 additions and 6 deletions
@@ -0,0 +1,15 @@
import attr
@attr.dataclass
class A1:
<error descr="Attribute 'a' lacks a type annotation">a</error> = attr.ib()
<error descr="Attribute 'b' lacks a type annotation">b</error> = attr.ib(type=int)
c = 1
d: int = 1
@attr.s(auto_attribs=True)
class A3:
<error descr="Attribute 'a' lacks a type annotation">a</error> = attr.ib()
<error descr="Attribute 'b' lacks a type annotation">b</error> = attr.ib(type=int)
c = 1
d: int = 1