suppress_deprecations¶
- lsst.utils.suppress_deprecations(category: type[Warning] = <class 'FutureWarning'>) Iterator[None] ¶
Suppress warnings generated by
deprecated.sphinx.deprecated
.Naively, one might attempt to suppress these warnings by using
catch_warnings
. However,deprecated
attempts to install its own filter, overriding that. This convenience method works around this and properly suppresses the warnings by providing a mocksimplefilter
fordeprecated
to call.- Parameters:
- category
Warning
or subclass The category of warning to suppress.
- category