Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: flake8-eyeo/tests/A202.py

Issue 29602805: Noissue - Remove bare exceptions from test cases (Closed) Base URL: https://hg.adblockplus.org/codingtools/
Patch Set: Removed .orig files Created Nov. 10, 2017, 12:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | flake8-eyeo/tests/A204.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 def noop(): 1 def noop():
2 pass 2 pass
3 3
4 4
5 def dead_code_after_return(): 5 def dead_code_after_return():
6 return 6 return
7 # A202 7 # A202
8 noop() 8 noop()
9 9
10 10
11 def dead_code_after_raise(): 11 def dead_code_after_raise():
12 raise Exception() 12 raise Exception()
13 # A202 13 # A202
14 noop() 14 noop()
15 15
16 16
17 def dead_code_after_return_in_try(): 17 def dead_code_after_return_in_try():
18 try: 18 try:
19 return 19 return
20 # A202 20 # A202
21 noop() 21 noop()
22 except: 22 except Exception:
23 return 23 return
24 # A202 24 # A202
25 noop() 25 noop()
26 finally: 26 finally:
27 return 27 return
28 # A202 28 # A202
29 noop() 29 noop()
30 30
31 31
32 for i in range(10): 32 for i in range(10):
33 if i == 0: 33 if i == 0:
34 continue 34 continue
35 # A202 35 # A202
36 noop() 36 noop()
37 37
38 if i == 1: 38 if i == 1:
39 break 39 break
40 # A202 40 # A202
41 noop() 41 noop()
OLDNEW
« no previous file with comments | « no previous file | flake8-eyeo/tests/A204.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld