diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 6c866f3db42..3c33eca92b2 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -358,7 +358,7 @@ def __init__( self._what: _AutodocObjType | Literal['object'] = what self._name = name self._obj = obj - if options: + if options is not None: try: self._no_index = options.no_index or options.noindex except (AttributeError, TypeError): diff --git a/tests/test_ext_autodoc/test_ext_autodoc.py b/tests/test_ext_autodoc/test_ext_autodoc.py index 0d2c29d13fb..8f526e051cf 100644 --- a/tests/test_ext_autodoc/test_ext_autodoc.py +++ b/tests/test_ext_autodoc/test_ext_autodoc.py @@ -2639,11 +2639,7 @@ def test_singledispatchmethod_classmethod_automethod() -> None: ] -@pytest.mark.skipif( - sys.version_info[:2] >= (3, 13), - reason='Cython does not support Python 3.13 yet.', -) -@pytest.mark.skipif(pyximport is None, reason='cython is not installed') +@pytest.mark.skipif(pyximport is None, reason='Cython is not installed') def test_cython() -> None: options = { 'members': None,