Coverage for /usr/lib/python3/dist-packages/scipy/special/add_newdocs.py: 50%

10 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

1# This file is not meant for public use and will be removed in SciPy v2.0.0. 

2 

3import warnings 

4from . import _add_newdocs 

5 

6__all__ = ['get', 'add_newdoc', 'Dict', 'docdict'] # noqa: F822 

7 

8 

9def __dir__(): 

10 return __all__ 

11 

12 

13def __getattr__(name): 

14 if name not in __all__: 

15 raise AttributeError( 

16 "scipy.special.add_newdocs is deprecated and has no attribute " 

17 f"{name}.") 

18 

19 warnings.warn("The `scipy.special.add_newdocs` namespace is deprecated." 

20 " and will be removed in SciPy v2.0.0.", 

21 category=DeprecationWarning, stacklevel=2) 

22 

23 return getattr(_add_newdocs, name)