@@ -632,7 +632,7 @@ def __bool__(self) -> bool:
632632 """
633633 return bool (self ._options [self ._name ])
634634
635- def __call__ (self , * args , ** kwds ):
635+ def __call__ (self , * args ):
636636 r"""
637637 Get or set value of the option ``self``.
638638
@@ -662,38 +662,20 @@ def __call__(self, *args, **kwds):
662662 True
663663 sage: config._reset()
664664
665- Check the deprecation ::
665+ Check the input ::
666666
667- sage: config.size(value=None)
668- doctest:...: DeprecationWarning: keyword argument "value" should be replaced by positional argument
669- See https://github.com/sagemath/sage/issues/30763 for details.
670- sage: config.size() is None
671- True
672667 sage: config.size(1, 2)
673668 Traceback (most recent call last):
674669 ...
675- TypeError: option takes at most one argument "value"
676- sage: config.size(unknown=3)
677- Traceback (most recent call last):
678- ...
679- TypeError: option takes at most one argument "value"
680- sage: config.size(4, value=5)
681- Traceback (most recent call last):
682- ...
683- TypeError: option takes at most one argument "value"
670+ TypeError: option takes at most one argument
684671 """
685- if not args and not kwds :
672+ if not args :
686673 return self ._options [self ._name ]
687- if 'value' in kwds :
688- from sage .misc .superseded import deprecation
689- deprecation (30763 , 'keyword argument "value" should be replaced '
690- 'by positional argument' )
691- args += (kwds .pop ('value' ),)
692- if len (args ) > 1 or kwds :
693- raise TypeError ('option takes at most one argument "value"' )
674+ if len (args ) > 1 :
675+ raise TypeError ('option takes at most one argument' )
694676 self ._options [self ._name ] = args [0 ]
695677
696- def __eq__ (self , other ):
678+ def __eq__ (self , other ) -> bool :
697679 r"""
698680 Equality testing for an option in based on the value of the attribute.
699681
@@ -708,7 +690,7 @@ def __eq__(self, other):
708690 """
709691 return self ._options [self ._name ] == other
710692
711- def __ne__ (self , other ):
693+ def __ne__ (self , other ) -> bool :
712694 r"""
713695 Inequality testing for an option in based on the value of
714696 the attribute.
@@ -724,7 +706,7 @@ def __ne__(self, other):
724706 """
725707 return self ._options [self ._name ] != other
726708
727- def __hash__ (self ):
709+ def __hash__ (self ) -> int :
728710 r"""
729711 Return the hash of ``self``, which is the hash of the corresponding
730712 value.
@@ -736,7 +718,7 @@ def __hash__(self):
736718 """
737719 return hash (self ._options [self ._name ])
738720
739- def __str__ (self ):
721+ def __str__ (self ) -> str :
740722 r"""
741723 Return the string representation of ``self``, which is the string of
742724 the corresponding value.
0 commit comments