Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b554c8c

Browse filesBrowse files
committed
Got rid of unnecessary 'raise...as' statements.
1 parent 56d62c6 commit b554c8c
Copy full SHA for b554c8c

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,20 +642,20 @@ def test_sticky_shared_axes(fig_test, fig_ref):
642642

643643

644644
def test_nargs_stem():
645-
with pytest.raises(TypeError, match='0 were given') as e:
645+
with pytest.raises(TypeError, match='0 were given'):
646646
# stem() takes 1-3 arguments.
647647
plt.stem()
648648

649649

650650
def test_nargs_legend():
651-
with pytest.raises(TypeError, match='3 were given') as e:
651+
with pytest.raises(TypeError, match='3 were given'):
652652
ax = plt.subplot()
653653
# legend() takes 0-2 arguments.
654654
ax.legend(['First'], ['Second'], 3)
655655

656656

657657
def test_nargs_pcolorfast():
658-
with pytest.raises(TypeError, match='2 were given') as e:
658+
with pytest.raises(TypeError, match='2 were given'):
659659
ax = plt.subplot()
660660
# pcolorfast() takes 1 or 3 arguments,
661661
# not passing any arguments fails at C = args[-1]

‎lib/matplotlib/tests/test_rcparams.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_rcparams.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_rcparams_init():
120120

121121
def test_nargs_cycler():
122122
from matplotlib.rcsetup import cycler as ccl
123-
with pytest.raises(TypeError, match='3 were given') as e:
123+
with pytest.raises(TypeError, match='3 were given'):
124124
# cycler() takes 0-2 arguments.
125125
ccl(ccl(color=list('rgb')), 2, 3)
126126

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.