widgets: flake8 and pylint fixes
[git-cola.git] / qtpy / QtNetworkAuth.py
blobabf7526e78f3fbabda9f28e200a1ef3f62150eb1
1 # -----------------------------------------------------------------------------
2 # Copyright © 2009- The Spyder Development Team
4 # Licensed under the terms of the MIT License
5 # (see LICENSE.txt for details)
6 # -----------------------------------------------------------------------------
8 """Provides QtNetworkAuth classes and functions."""
10 from . import (
11 PYQT5,
12 PYQT6,
13 PYSIDE2,
14 PYSIDE6,
15 QtModuleNotInstalledError,
16 QtBindingMissingModuleError,
19 if PYQT5:
20 try:
21 from PyQt5.QtNetworkAuth import *
22 except ModuleNotFoundError as error:
23 raise QtModuleNotInstalledError(
24 name='QtNetworkAuth', missing_package='PyQtNetworkAuth'
25 ) from error
26 elif PYQT6:
27 try:
28 from PyQt6.QtNetworkAuth import *
29 except ModuleNotFoundError as error:
30 raise QtModuleNotInstalledError(
31 name='QtNetworkAuth', missing_package='PyQt6-NetworkAuth'
32 ) from error
33 elif PYSIDE2:
34 raise QtBindingMissingModuleError(name='QtNetworkAuth')
35 elif PYSIDE6:
36 from PySide6.QtNetworkAuth import *