Skip to content

Commit 01ff866

Browse files
Andreas Freimuthbrycepg
Andreas Freimuth
authored andcommitted
Add testcases for tab indentation
1 parent 03aa4ca commit 01ff866

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"""Regression test case for bad-continuation with tabs"""
2+
# pylint: disable=too-few-public-methods,missing-docstring,invalid-name,unused-variable
3+
# Various alignment for brackets
4+
5+
# Issue 638
6+
TEST1 = ["foo",
7+
"bar",
8+
"baz"
9+
]
10+
11+
MY_LIST = [
12+
1, 2, 3,
13+
4, 5, 6
14+
]
15+
16+
# Issue 1148
17+
class Abc(object):
18+
def b(self, c):
19+
self.d(
20+
c)
21+
22+
def d(self, e):
23+
self.b(
24+
e) # [bad-continuation]
25+
26+
def f(self):
27+
return [
28+
self.b,
29+
self.d
30+
]
31+
32+
def g(self):
33+
return [self.b,
34+
self.d
35+
] # [bad-continuation]
36+
37+
def h(self):
38+
return [self.b,
39+
self.d
40+
]
41+
42+
def i(self):
43+
return [self.b,
44+
self.d
45+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[FORMAT]
2+
indent-string='\t'
3+
indent-after-paren=1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bad-continuation:24::"Wrong hanging indentation (add 1 space).
2+
e) # [bad-continuation]
3+
^|"
4+
bad-continuation:35::"Wrong continued indentation.
5+
] # [bad-continuation]
6+
^ ||"

0 commit comments

Comments
 (0)