Post

Treating Python warnings as errors

Converting warnings of a particular category from a particular module can be done using:

1
2
3
4
import warnings

warnings.filterwarnings("error", category=UserWarning, module="seaborn")

(Ref.)

This post is licensed under CC BY 4.0 by the author.