@@ -550,7 +550,6 @@ def _select_options(pat: str) -> List[str]:
550
550
551
551
if pat=="all", returns all registered options
552
552
"""
553
-
554
553
# short-circuit for exact key
555
554
if pat in _registered_options :
556
555
return [pat ]
@@ -573,7 +572,6 @@ def _get_root(key: str) -> Tuple[Dict[str, Any], str]:
573
572
574
573
def _is_deprecated (key : str ) -> bool :
575
574
""" Returns True if the given option has been deprecated """
576
-
577
575
key = key .lower ()
578
576
return key in _deprecated_options
579
577
@@ -586,7 +584,6 @@ def _get_deprecated_option(key: str):
586
584
-------
587
585
DeprecatedOption (namedtuple) if key is deprecated, None otherwise
588
586
"""
589
-
590
587
try :
591
588
d = _deprecated_options [key ]
592
589
except KeyError :
@@ -611,7 +608,6 @@ def _translate_key(key: str) -> str:
611
608
if key id deprecated and a replacement key defined, will return the
612
609
replacement key, otherwise returns `key` as - is
613
610
"""
614
-
615
611
d = _get_deprecated_option (key )
616
612
if d :
617
613
return d .rkey or key
@@ -627,7 +623,6 @@ def _warn_if_deprecated(key: str) -> bool:
627
623
-------
628
624
bool - True if `key` is deprecated, False otherwise.
629
625
"""
630
-
631
626
d = _get_deprecated_option (key )
632
627
if d :
633
628
if d .msg :
@@ -649,7 +644,6 @@ def _warn_if_deprecated(key: str) -> bool:
649
644
650
645
def _build_option_description (k : str ) -> str :
651
646
""" Builds a formatted description of a registered option and prints it """
652
-
653
647
o = _get_registered_option (k )
654
648
d = _get_deprecated_option (k )
655
649
@@ -674,7 +668,6 @@ def _build_option_description(k: str) -> str:
674
668
675
669
def pp_options_list (keys : Iterable [str ], width = 80 , _print : bool = False ):
676
670
""" Builds a concise listing of available options, grouped by prefix """
677
-
678
671
from textwrap import wrap
679
672
from itertools import groupby
680
673
@@ -738,7 +731,6 @@ def config_prefix(prefix):
738
731
will register options "display.font.color", "display.font.size", set the
739
732
value of "display.font.size"... and so on.
740
733
"""
741
-
742
734
# Note: reset_option relies on set_option, and on key directly
743
735
# it does not fit in to this monkey-patching scheme
744
736
@@ -801,7 +793,6 @@ def is_instance_factory(_type) -> Callable[[Any], None]:
801
793
ValueError if x is not an instance of `_type`
802
794
803
795
"""
804
-
805
796
if isinstance (_type , (tuple , list )):
806
797
_type = tuple (_type )
807
798
type_repr = "|" .join (map (str , _type ))
@@ -848,7 +839,6 @@ def is_nonnegative_int(value: Optional[int]) -> None:
848
839
ValueError
849
840
When the value is not None or is a negative integer
850
841
"""
851
-
852
842
if value is None :
853
843
return
854
844
0 commit comments