eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleStatisticsDialog.py

changeset 7615
ca2949b1a29a
parent 7613
382f89c11e27
child 7923
91e843545d9a
equal deleted inserted replaced
7614:646742c260bd 7615:ca2949b1a29a
38 stats = statistics.copy() 38 stats = statistics.copy()
39 filesCount = stats["_FilesCount"] 39 filesCount = stats["_FilesCount"]
40 filesIssues = stats["_FilesIssues"] 40 filesIssues = stats["_FilesIssues"]
41 fixesCount = stats["_IssuesFixed"] 41 fixesCount = stats["_IssuesFixed"]
42 ignoresCount = stats["_IgnoredErrors"] 42 ignoresCount = stats["_IgnoredErrors"]
43 securityOk = stats["_SecurityOK"]
43 del stats["_FilesCount"] 44 del stats["_FilesCount"]
44 del stats["_FilesIssues"] 45 del stats["_FilesIssues"]
45 del stats["_IssuesFixed"] 46 del stats["_IssuesFixed"]
46 del stats["_IgnoredErrors"] 47 del stats["_IgnoredErrors"]
48 del stats["_SecurityOK"]
47 49
48 totalIssues = 0 50 totalIssues = 0
49 51
50 textWrapper = textwrap.TextWrapper(width=80) 52 textWrapper = textwrap.TextWrapper(width=80)
51 53
66 self.tr("%n issue(s) fixed", "", fixesCount)) 68 self.tr("%n issue(s) fixed", "", fixesCount))
67 self.filesChecked.setText( 69 self.filesChecked.setText(
68 self.tr("%n file(s) checked", "", filesCount)) 70 self.tr("%n file(s) checked", "", filesCount))
69 self.filesIssues.setText( 71 self.filesIssues.setText(
70 self.tr("%n file(s) with issues found", "", filesIssues)) 72 self.tr("%n file(s) with issues found", "", filesIssues))
73 self.securityOk.setText(
74 self.tr("%n security issue(s) acknowledged", "", securityOk))
71 75
72 self.statisticsList.resizeColumnToContents(0) 76 self.statisticsList.resizeColumnToContents(0)
73 self.statisticsList.resizeColumnToContents(1) 77 self.statisticsList.resizeColumnToContents(1)
74 78
75 def __createItem(self, count, code, message): 79 def __createItem(self, count, code, message):
91 elif code.startswith("D"): 95 elif code.startswith("D"):
92 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError")) 96 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError"))
93 elif code.startswith("S"): 97 elif code.startswith("S"):
94 itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) 98 itm.setIcon(1, UI.PixmapCache.getIcon("securityLow"))
95 99
96 itm.setTextAlignment(0, Qt.AlignRight) 100 itm.setTextAlignment(0, Qt.AlignRight | Qt.AlignVCenter)
97 itm.setTextAlignment(1, Qt.AlignHCenter) 101 itm.setTextAlignment(1, Qt.AlignHCenter | Qt.AlignVCenter)

eric ide

mercurial