GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ClosePackageManagerDialog   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B __init__() 0 31 1
1
# Third party imports
2
from qtpy.QtCore import Qt
3
from qtpy.QtGui import QPixmap
4
from qtpy.QtWidgets import (QApplication, QDialogButtonBox, QDialog,
5
                            QHBoxLayout, QLabel, QPushButton, QVBoxLayout)
6
7
8
class ClosePackageManagerDialog(QDialog):
9
    """
10
    """
11
    def __init__(self, *args, **kwargs):
12
        super(ClosePackageManagerDialog, self).__init__(*args, **kwargs)
13
        self.label_icon = QLabel()
14
        self.label_about = QLabel('Conda is still busy.\n\n'
15
                                  'Do you want to cancel the process?')
16
        self.button_ok = QPushButton('Yes')
17
        self.button_cancel = QPushButton('No')
18
        self.buttonbox = QDialogButtonBox(Qt.Horizontal)
19
20
        # Widget setup
21
        self.buttonbox.addButton(self.button_ok, QDialogButtonBox.ActionRole)
22
        self.buttonbox.addButton(self.button_cancel,
23
                                 QDialogButtonBox.ActionRole)
24
#        self.label_icon.setPixmap(QPixmap(images.ANACONDA_ICON_64_PATH))
25
        self.setWindowTitle("Cancel Process")
26
27
        # Layouts
28
        h_layout = QHBoxLayout()
29
        h_layout.addWidget(self.label_icon, 0, Qt.AlignTop)
30
        h_layout.addSpacing(10)
31
        h_layout.addWidget(self.label_about)
32
33
        main_layout = QVBoxLayout()
34
        main_layout.addLayout(h_layout)
35
        main_layout.addSpacing(20)
36
        main_layout.addWidget(self.buttonbox)
37
        self.setLayout(main_layout)
38
39
        # Signals
40
        self.button_ok.clicked.connect(self.accept)
41
        self.button_cancel.clicked.connect(self.reject)
42
43
44
def test():
45
    app = QApplication([])
46
    dlg = ClosePackageManagerDialog(parent=None)
47
    reply = dlg.exec_()
48
    print(reply)
49
50
51
if __name__ == '__main__':
52
    test()
53