FIX: warnings functional call, fixes #325

This commit is contained in:
Daniel Cosmo Pizetta
2023-10-25 15:50:41 -03:00
parent 879dad5d29
commit 886094bea8
+2 -2
View File
@@ -355,7 +355,7 @@ def load_stylesheet(*args, **kwargs):
stylesheet = _load_stylesheet(qt_api='pyqt4', palette=palette)
# Deprecation warning only for old API
warnings.warning(DEPRECATION_MSG, DeprecationWarning)
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
# New API arguments
elif 'qt_api' in kwargs or isinstance(arg, str):
@@ -453,7 +453,7 @@ def load_stylesheet_from_environment(is_pyqtgraph=False):
Returns:
str: the stylesheet string.
"""
warnings.warning(DEPRECATION_MSG, DeprecationWarning)
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
if is_pyqtgraph:
stylesheet = _load_stylesheet(qt_api=os.environ.get('PYQTGRAPH_QT_LIB', None))