Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e5bbdc

Browse files
committed
More _check_in_list.
1 parent fdeeda5 commit 5e5bbdc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -849,11 +849,7 @@ def _print_ps(self, outfile, format, *args,
849849
if papertype is None:
850850
papertype = rcParams['ps.papersize']
851851
papertype = papertype.lower()
852-
if papertype == 'auto':
853-
pass
854-
elif papertype not in papersize:
855-
raise RuntimeError('%s is not a valid papertype. Use one of %s' %
856-
(papertype, ', '.join(papersize)))
852+
cbook._check_in_list(['auto', *papersize], papertype=papertype)
857853

858854
orientation = orientation.lower()
859855
cbook._check_in_list(['landscape', 'portrait'],

0 commit comments

Comments
 (0)