@@ -2013,6 +2013,8 @@ def set_ticks_position(self, position):
20132013 ----------
20142014 position : {'top', 'bottom', 'both', 'default', 'none'}
20152015 """
2016+ cbook ._check_in_list (['top' , 'bottom' , 'both' , 'default' , 'none' ],
2017+ position = position )
20162018 if position == 'top' :
20172019 self .set_tick_params (which = 'both' , top = True , labeltop = True ,
20182020 bottom = False , labelbottom = False )
@@ -2032,7 +2034,7 @@ def set_ticks_position(self, position):
20322034 bottom = True , labelbottom = True )
20332035 self ._tick_position = 'bottom'
20342036 else :
2035- raise ValueError ( "invalid position: %s" % position )
2037+ assert False , "unhandled parameter not caught by _check_in_list"
20362038 self .stale = True
20372039
20382040 def tick_top (self ):
@@ -2300,6 +2302,8 @@ def set_ticks_position(self, position):
23002302 ----------
23012303 position : {'left', 'right', 'both', 'default', 'none'}
23022304 """
2305+ cbook ._check_in_list (['left' , 'right' , 'both' , 'default' , 'none' ],
2306+ position = position )
23032307 if position == 'right' :
23042308 self .set_tick_params (which = 'both' , right = True , labelright = True ,
23052309 left = False , labelleft = False )
@@ -2318,7 +2322,7 @@ def set_ticks_position(self, position):
23182322 self .set_tick_params (which = 'both' , right = True , labelright = False ,
23192323 left = True , labelleft = True )
23202324 else :
2321- raise ValueError ( "invalid position: %s" % position )
2325+ assert False , "unhandled parameter not caught by _check_in_list"
23222326 self .stale = True
23232327
23242328 def tick_right (self ):
0 commit comments