File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -476,6 +476,10 @@ def validate_bbox(s):
476476 if s == 'standard' :
477477 return None
478478 raise ValueError ("bbox should be 'tight' or 'standard'" )
479+ elif s is not None :
480+ # Backwards compatibility. None is equivalent to 'standard'.
481+ raise ValueError ("bbox should be 'tight' or 'standard'" )
482+ return s
479483
480484def validate_sketch (s ):
481485 if isinstance (s , six .string_types ):
@@ -790,7 +794,7 @@ def __call__(self, s):
790794 # value checked by backend at runtime
791795 'savefig.format' : ['png' , update_savefig_format ],
792796 # options are 'tight', or 'standard'. 'standard' validates to None.
793- 'savefig.bbox' : [None , validate_bbox ],
797+ 'savefig.bbox' : ['standard' , validate_bbox ],
794798 'savefig.pad_inches' : [0.1 , validate_float ],
795799 # default directory in savefig dialog box
796800 'savefig.directory' : ['~' , six .text_type ],
You can’t perform that action at this time.
0 commit comments