@@ -400,8 +400,7 @@ def trigger(self, sender, event, data=None):
400
400
401
401
402
402
class _ToolGridBase (ToolBase ):
403
- """Common functionality between ToolGrid and ToolMinorGrid.
404
- """
403
+ """Common functionality between ToolGrid and ToolMinorGrid."""
405
404
406
405
_cycle = [(False , False ), (True , False ), (True , True ), (False , True )]
407
406
@@ -420,7 +419,8 @@ def trigger(self, sender, event, data=None):
420
419
421
420
@staticmethod
422
421
def _get_uniform_grid_state (ticks ):
423
- """Check whether all grid lines are in the same visibility state.
422
+ """
423
+ Check whether all grid lines are in the same visibility state.
424
424
425
425
Returns True/False if all grid lines are on or off, None if they are
426
426
not all in the same state.
@@ -443,7 +443,7 @@ def _get_next_grid_states(self, ax):
443
443
x_state , y_state = map (self ._get_uniform_grid_state ,
444
444
[ax .xaxis .majorTicks , ax .yaxis .majorTicks ])
445
445
cycle = self ._cycle
446
- # Bail out if major grids are not in a uniform state.
446
+ # Bail out (via ValueError) if major grids are not in a uniform state.
447
447
x_state , y_state = (
448
448
cycle [(cycle .index ((x_state , y_state )) + 1 ) % len (cycle )])
449
449
return x_state , y_state , "major"
@@ -463,7 +463,7 @@ def _get_next_grid_states(self, ax):
463
463
x_state , y_state = map (self ._get_uniform_grid_state ,
464
464
[ax .xaxis .minorTicks , ax .yaxis .minorTicks ])
465
465
cycle = self ._cycle
466
- # Bail out if minor grids are not in a uniform state.
466
+ # Bail out (via ValueError) if minor grids are not in a uniform state.
467
467
x_state , y_state = (
468
468
cycle [(cycle .index ((x_state , y_state )) + 1 ) % len (cycle )])
469
469
return x_state , y_state , "both"
0 commit comments