From 886094bea8182f669c8b14f88b81b48fbef0a537 Mon Sep 17 00:00:00 2001 From: Daniel Cosmo Pizetta Date: Wed, 25 Oct 2023 15:50:41 -0300 Subject: [PATCH] FIX: warnings functional call, fixes #325 --- qdarkstyle/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qdarkstyle/__init__.py b/qdarkstyle/__init__.py index 9a8c72c..7a0e277 100644 --- a/qdarkstyle/__init__.py +++ b/qdarkstyle/__init__.py @@ -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))