mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
Add some newlines to avoid issues in other files.
This commit is contained in:
@@ -27,12 +27,14 @@ class TestP4Poller(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
|
||||
#
|
||||
if True:
|
||||
#: E101:0 E101+1:0
|
||||
foo(1,
|
||||
2)
|
||||
|
||||
|
||||
def test_keys(self):
|
||||
"""areas.json - All regions are accounted for."""
|
||||
expected = set([
|
||||
@@ -41,6 +43,8 @@ def test_keys(self):
|
||||
#: E101:0
|
||||
u'V\xe4sterbotten',
|
||||
])
|
||||
|
||||
|
||||
if True:
|
||||
print("""
|
||||
tab at start of this line
|
||||
|
||||
@@ -38,11 +38,14 @@ if start[1] > end_col and not (
|
||||
return (0, "E121 continuation line over-"
|
||||
"indented for visual indent")
|
||||
|
||||
|
||||
#: E101+3
|
||||
def long_function_name(
|
||||
var_one, var_two, var_three,
|
||||
var_four):
|
||||
print(var_one)
|
||||
|
||||
|
||||
#: E101+2
|
||||
if ((row < 0 or self.moduleCount <= row or
|
||||
col < 0 or self.moduleCount <= col)):
|
||||
@@ -119,6 +122,8 @@ if True:
|
||||
foo(
|
||||
1,
|
||||
2)
|
||||
|
||||
|
||||
#: E101+1 E101+2 E101+3 E101+4 E101+5
|
||||
def test_keys(self):
|
||||
"""areas.json - All regions are accounted for."""
|
||||
@@ -126,6 +131,8 @@ def test_keys(self):
|
||||
u'Norrbotten',
|
||||
u'V\xe4sterbotten',
|
||||
])
|
||||
|
||||
|
||||
#: E101+1
|
||||
x = [
|
||||
'abc'
|
||||
|
||||
@@ -24,6 +24,7 @@ mimetype = 'application/x-directory'
|
||||
# 'httpd/unix-directory'
|
||||
create_date = False
|
||||
|
||||
|
||||
def start(self):
|
||||
# foo
|
||||
#: E111:8
|
||||
@@ -46,6 +47,8 @@ def start(self):
|
||||
#: E111:2
|
||||
# Also wrongly indented.
|
||||
# Indent is correct.
|
||||
|
||||
|
||||
def start(self): # Correct comment
|
||||
if True:
|
||||
#: E111:0
|
||||
|
||||
@@ -100,8 +100,11 @@ x = x / 2-1
|
||||
hypot2 = x*x + y*y
|
||||
c = (a + b)*(a - b)
|
||||
|
||||
|
||||
def halves(n):
|
||||
return (i//2 for i in range(n))
|
||||
|
||||
|
||||
#: E227:11 E227:13
|
||||
_1kB = _1MB>>10
|
||||
#: E227:11 E227:13
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
def foo(bar = False):
|
||||
'''Test function with an error in declaration'''
|
||||
pass
|
||||
|
||||
|
||||
#: E251:8
|
||||
foo(bar= True)
|
||||
#: E251:7
|
||||
@@ -33,24 +35,30 @@ foo(bar=(1 <= 1))
|
||||
(options, args) = parser.parse_args()
|
||||
d[type(None)] = _deepcopy_atomic
|
||||
|
||||
|
||||
# Annotated Function Definitions
|
||||
# Okay
|
||||
def munge(input: AnyStr, sep: AnyStr = None, limit=1000,
|
||||
extra: Union[str, dict] = None) -> AnyStr:
|
||||
pass
|
||||
|
||||
|
||||
# Okay
|
||||
async def add(a: int = 0, b: int = 0) -> int:
|
||||
return a + b
|
||||
|
||||
|
||||
# Previously E251 four times
|
||||
#: E221:5
|
||||
async def add(a: int = 0, b: int = 0) -> int:
|
||||
return a + b
|
||||
|
||||
|
||||
#: E225:24 E225:26
|
||||
def x(b: tuple = (1, 2))->int:
|
||||
return a + b
|
||||
|
||||
|
||||
#: E252:11 E252:12 E231:8
|
||||
def b(a:int=1):
|
||||
pass
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
# 情
|
||||
#: W291:5
|
||||
print
|
||||
|
||||
|
||||
#: W291+1
|
||||
class Foo(object):
|
||||
|
||||
bang = 12
|
||||
|
||||
|
||||
#: W291+1:34
|
||||
'''multiline
|
||||
string with trailing whitespace'''
|
||||
|
||||
Reference in New Issue
Block a user