src/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py
--- a/src/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -19,11 +19,21 @@
     """
     Class implementing a dialog to show the VirusTotal domain report.
     """
-    def __init__(self, domain, resolutions, urls, subdomains,
-                 categories, webutation, whois, parent=None):
+
+    def __init__(
+        self,
+        domain,
+        resolutions,
+        urls,
+        subdomains,
+        categories,
+        webutation,
+        whois,
+        parent=None,
+    ):
         """
         Constructor
-        
+
         @param domain domain name
         @type str
         @param resolutions list of resolved host names
@@ -45,58 +55,59 @@
         super().__init__(parent)
         self.setupUi(self)
         self.setWindowFlags(Qt.WindowType.Window)
-        
-        self.headerLabel.setText(
-            self.tr("<b>Report for domain {0}</b>").format(domain))
-        self.headerPixmap.setPixmap(
-            UI.PixmapCache.getPixmap("virustotal"))
-        
+
+        self.headerLabel.setText(self.tr("<b>Report for domain {0}</b>").format(domain))
+        self.headerPixmap.setPixmap(UI.PixmapCache.getPixmap("virustotal"))
+
         for resolution in resolutions:
             QTreeWidgetItem(
                 self.resolutionsList,
-                [resolution["ip_address"],
-                 resolution["last_resolved"].split()[0]]
+                [resolution["ip_address"], resolution["last_resolved"].split()[0]],
             )
         self.resolutionsList.resizeColumnToContents(0)
         self.resolutionsList.resizeColumnToContents(1)
         self.resolutionsList.sortByColumn(0, Qt.SortOrder.AscendingOrder)
-        
+
         for url in urls:
             QTreeWidgetItem(
                 self.urlsList,
-                [url["url"],
-                 self.tr("{0}/{1}", "positives / total").format(
-                    url["positives"], url["total"]),
-                 url["scan_date"].split()[0]]
+                [
+                    url["url"],
+                    self.tr("{0}/{1}", "positives / total").format(
+                        url["positives"], url["total"]
+                    ),
+                    url["scan_date"].split()[0],
+                ],
             )
         self.urlsList.resizeColumnToContents(0)
         self.urlsList.resizeColumnToContents(1)
         self.urlsList.resizeColumnToContents(2)
         self.urlsList.sortByColumn(0, Qt.SortOrder.AscendingOrder)
-        
+
         if subdomains:
             self.subdomainsList.addItems(subdomains)
             self.subdomainsList.sortItems()
-        
+
         self.bdLabel.setText(categories["bitdefender"])
         self.soLabel.setText(categories["sophos"])
         self.vvLabel.setText(categories["valkyrie"])
         self.amLabel.setText(categories["alpha"])
         self.ftsLabel.setText(categories["forcepoint"])
-        
+
         self.webutationAdultLabel.setText(webutation["adult"])
         self.webutationSafetyLabel.setText(str(webutation["safety"]))
         self.webutationVerdictLabel.setText(webutation["verdict"])
-        
+
         self.__whois = whois
         self.__whoisDomain = domain
         self.whoisButton.setEnabled(bool(whois))
-    
+
     @pyqtSlot()
     def on_whoisButton_clicked(self):
         """
         Private slot to show the whois information.
         """
         from .VirusTotalWhoisDialog import VirusTotalWhoisDialog
+
         dlg = VirusTotalWhoisDialog(self.__whoisDomain, self.__whois)
         dlg.exec()

eric ide

mercurial