Skip to content

Commit 97bd635

Browse files
Add doc and regression test
1 parent 4f9a964 commit 97bd635

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Using a slice as a class decorator now raise a 'not-callable' message instead of crashing pylint.
2+
3+
Closes #10334
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Test for slice object used as a decorator."""
2+
# pylint: disable=too-few-public-methods
3+
s = slice(-2)
4+
@s() # [not-callable]
5+
class A:
6+
"""Class with a slice decorator."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
not-callable:4:1:4:4:A:s is not callable:UNDEFINED

0 commit comments

Comments
 (0)