mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Highlight attrs attributes lacking type annotation (PY-26354)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user