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))