Skip to content

Commit be9c97c

Browse files
committed
Add regression test
1 parent 62b5da4 commit be9c97c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""Regression test for https://github.com/pylint-dev/pylint/issues/10525."""
2+
3+
# pylint: disable=too-few-public-methods
4+
5+
from typing import ClassVar
6+
7+
import attrs
8+
9+
10+
class X:
11+
"""Class without attrs decorator"""
12+
13+
A: ClassVar[int] = 1
14+
15+
def __init__(self) -> None:
16+
self.b: int = 2
17+
18+
19+
@attrs.define
20+
class Y:
21+
"""Class with attrs decorator"""
22+
23+
A: ClassVar[int] = 1 # should not trigger `invalid-name`
24+
b: int = 2

tests/functional/i/invalid/invalid_name/invalid_name_issue_10525.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)