diff --git a/test/normalizer_issue_files/E10.py b/test/normalizer_issue_files/E10.py index d23d1d2..f49bd93 100644 --- a/test/normalizer_issue_files/E10.py +++ b/test/normalizer_issue_files/E10.py @@ -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 diff --git a/test/normalizer_issue_files/E101.py b/test/normalizer_issue_files/E101.py index 34feea7..2790932 100644 --- a/test/normalizer_issue_files/E101.py +++ b/test/normalizer_issue_files/E101.py @@ -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' diff --git a/test/normalizer_issue_files/E11.py b/test/normalizer_issue_files/E11.py index 6469a83..00442a0 100644 --- a/test/normalizer_issue_files/E11.py +++ b/test/normalizer_issue_files/E11.py @@ -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 diff --git a/test/normalizer_issue_files/E22.py b/test/normalizer_issue_files/E22.py index c81e46b..ce454cd 100644 --- a/test/normalizer_issue_files/E22.py +++ b/test/normalizer_issue_files/E22.py @@ -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 diff --git a/test/normalizer_issue_files/E25.py b/test/normalizer_issue_files/E25.py index 92afe57..98052fb 100644 --- a/test/normalizer_issue_files/E25.py +++ b/test/normalizer_issue_files/E25.py @@ -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 diff --git a/test/normalizer_issue_files/E29.py b/test/normalizer_issue_files/E29.py index e83768f..cebbb7b 100644 --- a/test/normalizer_issue_files/E29.py +++ b/test/normalizer_issue_files/E29.py @@ -2,10 +2,14 @@ # 情 #: W291:5 print + + #: W291+1 class Foo(object): bang = 12 + + #: W291+1:34 '''multiline string with trailing whitespace'''