diff --git a/setoolsgui/apol.py b/setoolsgui/apol.py
index 6d2b867..8b38ed6 100644
--- a/setoolsgui/apol.py
+++ b/setoolsgui/apol.py
@@ -446,8 +446,8 @@ class ApolWorkspace(QtWidgets.QTabWidget):
assert self.policy
assert self.permmap
- new_tab = tab_class(self.policy, self.permmap,
- parent=self)
+ new_tab = tab_class(self.policy, parent=self)
+ new_tab.handle_permmap_change(self.permmap)
new_tab.setObjectName(counted_name)
self.permmap_changed.connect(new_tab.handle_permmap_change)
index = self.addTab(new_tab, counted_name)
diff --git a/setoolsgui/widgets/boolquery.py b/setoolsgui/widgets/boolquery.py
index a5d12a8..21873f7 100644
--- a/setoolsgui/widgets/boolquery.py
+++ b/setoolsgui/widgets/boolquery.py
@@ -16,10 +16,10 @@ class BoolQueryTab(tab.TableResultTabWidget):
tab_title = "Booleans"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.BoolQuery(policy), None, enable_criteria=True,
+ super().__init__(setools.BoolQuery(policy), enable_criteria=True,
enable_browser=True, parent=parent)
self.setWhatsThis("Search Booleans in a SELinux policy.")
@@ -69,7 +69,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = BoolQueryTab(setools.SELinuxPolicy(), mw)
+ widget = BoolQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/commonquery.py b/setoolsgui/widgets/commonquery.py
index 70f36a1..a97060c 100644
--- a/setoolsgui/widgets/commonquery.py
+++ b/setoolsgui/widgets/commonquery.py
@@ -16,10 +16,10 @@ class CommonQueryTab(tab.TableResultTabWidget):
tab_title = "Common Permision Sets"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.CommonQuery(policy), None, enable_criteria=True,
+ super().__init__(setools.CommonQuery(policy), enable_criteria=True,
enable_browser=True, parent=parent)
self.setWhatsThis("Search common permission sets in an SELinux policy.")
@@ -67,7 +67,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = CommonQueryTab(setools.SELinuxPolicy(), mw)
+ widget = CommonQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/constraintquery.py b/setoolsgui/widgets/constraintquery.py
index 1709e34..f73b2e3 100644
--- a/setoolsgui/widgets/constraintquery.py
+++ b/setoolsgui/widgets/constraintquery.py
@@ -16,11 +16,10 @@ class ConstraintQueryTab(tab.TableResultTabWidget):
tab_title = "Constraints"
mlsonly = False
- def __init__(self, policy: "setools.SELinuxPolicy", _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.ConstraintQuery(policy), None, enable_criteria=True,
- parent=parent)
+ super().__init__(setools.ConstraintQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search constraints in a SELinux policy.")
@@ -130,7 +129,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = ConstraintQueryTab(setools.SELinuxPolicy(), mw)
+ widget = ConstraintQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/fsusequery.py b/setoolsgui/widgets/fsusequery.py
index 1af51a8..8ca1a42 100644
--- a/setoolsgui/widgets/fsusequery.py
+++ b/setoolsgui/widgets/fsusequery.py
@@ -16,10 +16,10 @@ class FSUseQueryTab(tab.TableResultTabWidget):
tab_title = "Fs_use_*"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.FSUseQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.FSUseQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search fs_use_* statements in a SELinux policy.")
@@ -68,7 +68,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = FSUseQueryTab(setools.SELinuxPolicy(), mw)
+ widget = FSUseQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/genfsconquery.py b/setoolsgui/widgets/genfsconquery.py
index 0fb8c50..e137832 100644
--- a/setoolsgui/widgets/genfsconquery.py
+++ b/setoolsgui/widgets/genfsconquery.py
@@ -16,10 +16,10 @@ class GenfsconQueryTab(tab.TableResultTabWidget):
tab_title = "Genfscons"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.GenfsconQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.GenfsconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search genfscon statements in a SELinux policy.")
@@ -67,7 +67,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = GenfsconQueryTab(setools.SELinuxPolicy(), mw)
+ widget = GenfsconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/ibendportconquery.py b/setoolsgui/widgets/ibendportconquery.py
index 541ad79..5f57670 100644
--- a/setoolsgui/widgets/ibendportconquery.py
+++ b/setoolsgui/widgets/ibendportconquery.py
@@ -16,11 +16,10 @@ class IbendportconQueryTab(tab.TableResultTabWidget):
tab_title = "Infiniband Endport Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.IbendportconQuery(policy), None, enable_criteria=True,
- parent=parent)
+ super().__init__(setools.IbendportconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search ibendportcon statements in a SELinux policy.")
@@ -67,7 +66,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = IbendportconQueryTab(setools.SELinuxPolicy(), None, parent=mw)
+ widget = IbendportconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/ibpkeyconquery.py b/setoolsgui/widgets/ibpkeyconquery.py
index 39417f1..491c1a4 100644
--- a/setoolsgui/widgets/ibpkeyconquery.py
+++ b/setoolsgui/widgets/ibpkeyconquery.py
@@ -16,11 +16,10 @@ class IbpkeyconQueryTab(tab.TableResultTabWidget):
tab_title = "Infiniband Partition Key Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.IbpkeyconQuery(policy), None, enable_criteria=True,
- parent=parent)
+ super().__init__(setools.IbpkeyconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search ibpkeycon statements in a SELinux policy.")
@@ -66,7 +65,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = IbpkeyconQueryTab(setools.SELinuxPolicy(), None, parent=mw)
+ widget = IbpkeyconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/infoflow.py b/setoolsgui/widgets/infoflow.py
index ca1b76b..a9125f3 100644
--- a/setoolsgui/widgets/infoflow.py
+++ b/setoolsgui/widgets/infoflow.py
@@ -37,10 +37,13 @@ class InfoFlowAnalysisTab(tab.DirectedGraphResultTab[setools.InfoFlowAnalysis]):
tab_title = "Information Flow Analysis"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, perm_map: setools.PermissionMap, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.InfoFlowAnalysis(policy, perm_map), perm_map,
+ permmap = setools.PermissionMap()
+ permmap.map_policy(policy)
+
+ super().__init__(setools.InfoFlowAnalysis(policy, permmap),
enable_criteria=True, parent=parent)
self.setWhatsThis("Information flow analysis of an SELinux policy.")
@@ -319,7 +322,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = InfoFlowAnalysisTab(setools.SELinuxPolicy(), setools.PermissionMap(), parent=mw)
+ widget = InfoFlowAnalysisTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/initsidquery.py b/setoolsgui/widgets/initsidquery.py
index e4cfbf1..bd52afd 100644
--- a/setoolsgui/widgets/initsidquery.py
+++ b/setoolsgui/widgets/initsidquery.py
@@ -16,10 +16,10 @@ class InitialSIDQueryTab(tab.TableResultTabWidget):
tab_title = "Initial Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.InitialSIDQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.InitialSIDQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search initial context statements in a SELinux policy.")
@@ -61,7 +61,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = InitialSIDQueryTab(setools.SELinuxPolicy(), mw)
+ widget = InitialSIDQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/mlsrulequery.py b/setoolsgui/widgets/mlsrulequery.py
index 790fc46..c715b0e 100644
--- a/setoolsgui/widgets/mlsrulequery.py
+++ b/setoolsgui/widgets/mlsrulequery.py
@@ -14,10 +14,10 @@ class MLSRuleQueryTab(tab.TableResultTabWidget):
tab_title = "Multi-Level Security (MLS) Rules"
mlsonly = True
- def __init__(self, policy: "setools.SELinuxPolicy", _, /, *,
+ def __init__(self, policy: "setools.SELinuxPolicy", /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.MLSRuleQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.MLSRuleQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search Type Enforcement rules in a SELinux policy.")
@@ -132,7 +132,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = MLSRuleQueryTab(setools.SELinuxPolicy(), mw)
+ widget = MLSRuleQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/netifconquery.py b/setoolsgui/widgets/netifconquery.py
index 0280799..5687fd9 100644
--- a/setoolsgui/widgets/netifconquery.py
+++ b/setoolsgui/widgets/netifconquery.py
@@ -16,10 +16,10 @@ class NetifconQueryTab(tab.TableResultTabWidget):
tab_title = "Network Interface Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.NetifconQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.NetifconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search netifcon statements in a SELinux policy.")
@@ -61,7 +61,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = NetifconQueryTab(setools.SELinuxPolicy(), mw)
+ widget = NetifconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/nodeconquery.py b/setoolsgui/widgets/nodeconquery.py
index 274b864..25ed2f3 100644
--- a/setoolsgui/widgets/nodeconquery.py
+++ b/setoolsgui/widgets/nodeconquery.py
@@ -16,11 +16,10 @@ class NodeconQueryTab(tab.TableResultTabWidget):
tab_title = "Network Node Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.NodeconQuery(policy), None, enable_criteria=True,
- parent=parent)
+ super().__init__(setools.NodeconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search nodecon statements in a SELinux policy.")
@@ -69,7 +68,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = NodeconQueryTab(setools.SELinuxPolicy(), None, parent=mw)
+ widget = NodeconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/portconquery.py b/setoolsgui/widgets/portconquery.py
index d1f53ac..93c6f7b 100644
--- a/setoolsgui/widgets/portconquery.py
+++ b/setoolsgui/widgets/portconquery.py
@@ -16,10 +16,10 @@ class PortconQueryTab(tab.TableResultTabWidget):
tab_title = "Network Port Contexts"
mlsonly = False
- def __init__(self, policy: setools.SELinuxPolicy, _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.PortconQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.PortconQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search portcon statements in a SELinux policy.")
@@ -101,7 +101,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = PortconQueryTab(setools.SELinuxPolicy(), mw)
+ widget = PortconQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(1280, 1024)
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/rbacrulequery.py b/setoolsgui/widgets/rbacrulequery.py
index 60f3b07..8848117 100644
--- a/setoolsgui/widgets/rbacrulequery.py
+++ b/setoolsgui/widgets/rbacrulequery.py
@@ -14,10 +14,10 @@ class RBACRuleQueryTab(tab.TableResultTabWidget):
tab_title = "Role-based Access Control (RBAC) Rules"
mlsonly = False
- def __init__(self, policy: "setools.SELinuxPolicy", _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.RBACRuleQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.RBACRuleQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search RBAC rules in a SELinux policy.")
@@ -119,7 +119,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = RBACRuleQueryTab(setools.SELinuxPolicy(), mw)
+ widget = RBACRuleQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/summary.py b/setoolsgui/widgets/summary.py
index 41891d8..0d99cd7 100644
--- a/setoolsgui/widgets/summary.py
+++ b/setoolsgui/widgets/summary.py
@@ -3,9 +3,8 @@
#
# SPDX-License-Identifier: LGPL-2.1-only
-import typing
-
from PyQt6 import QtCore, QtGui, QtWidgets
+import setools
from . import tab
@@ -20,11 +19,11 @@ class SummaryTab(tab.BaseAnalysisTabWidget):
tab_title = "SELinux Policy Summary"
mlsonly = False
- def __init__(self, policy: "setools.SELinuxPolicy", _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(policy, None, enable_criteria=False, parent=parent)
- self.policy: typing.Final = policy
+ super().__init__(policy, enable_criteria=False, parent=parent)
+ self.policy = policy
# font for labels
font = QtGui.QFont()
@@ -210,7 +209,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = SummaryTab(setools.SELinuxPolicy(), None, parent=mw)
+ widget = SummaryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/tab.py b/setoolsgui/widgets/tab.py
index c6ed54d..8802202 100644
--- a/setoolsgui/widgets/tab.py
+++ b/setoolsgui/widgets/tab.py
@@ -68,7 +68,7 @@ class TabProtocol(typing.Protocol):
section: AnalysisSection
mlsonly: bool
- def __init__(self, policy: setools.SELinuxPolicy, perm_map: setools.PermissionMap, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
...
@@ -107,7 +107,7 @@ class BaseAnalysisTabWidget(QtWidgets.QScrollArea, metaclass=TabRegistry):
criteria: tuple[criteria.criteria.CriteriaWidget, ...]
perm_map: setools.PermissionMap
- def __init__(self, _, __, /, *,
+ def __init__(self, _, /, *,
enable_criteria: bool = True, enable_browser: bool = False,
parent: QtWidgets.QWidget | None = None) -> None:
@@ -375,11 +375,11 @@ class TableResultTabWidget(BaseAnalysisTabWidget):
Table = 0
Text = 1
- def __init__(self, query: setools.PolicyQuery, _, /, *,
+ def __init__(self, query: setools.PolicyQuery, /, *,
enable_criteria: bool = True, enable_browser: bool = False,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(query, None, enable_criteria=enable_criteria,
+ super().__init__(query, enable_criteria=enable_criteria,
enable_browser=enable_browser, parent=parent)
self.query: typing.Final = query
@@ -556,11 +556,11 @@ class DirectedGraphResultTab(BaseAnalysisTabWidget, typing.Generic[DGA]):
Tree = 1
Text = 2
- def __init__(self, query: DGA, _, /, *,
+ def __init__(self, query: DGA, /, *,
enable_criteria: bool = True,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(query, None, enable_criteria=enable_criteria, enable_browser=False,
+ super().__init__(query, enable_criteria=enable_criteria, enable_browser=False,
parent=parent)
self.query: typing.Final = query
@@ -723,13 +723,13 @@ if __name__ == '__main__':
tw = QtWidgets.QTabWidget(mw)
mw.setCentralWidget(tw)
- widget1 = BaseAnalysisTabWidget(None, None, parent=tw)
+ widget1 = BaseAnalysisTabWidget(None, parent=tw)
tw.addTab(widget1, "BaseAnalysisTabWidget w/criteria")
- widget2 = BaseAnalysisTabWidget(None, None, enable_criteria=False, parent=tw)
+ widget2 = BaseAnalysisTabWidget(None, enable_criteria=False, parent=tw)
tw.addTab(widget2, "BaseAnalysisTabWidget w/o criteria")
- widget3 = TableResultTabWidget(q, None, parent=tw)
+ widget3 = TableResultTabWidget(q, parent=tw)
tw.addTab(widget3, "TableResultTabWidget")
- widget4 = DirectedGraphResultTab(a, None, parent=tw)
+ widget4 = DirectedGraphResultTab(a, parent=tw)
tw.addTab(widget4, "GraphResultTabWidget w/criteria")
mw.resize(1024, 768)
diff --git a/setoolsgui/widgets/terulequery.py b/setoolsgui/widgets/terulequery.py
index 0fa62d2..87657d9 100644
--- a/setoolsgui/widgets/terulequery.py
+++ b/setoolsgui/widgets/terulequery.py
@@ -16,10 +16,10 @@ class TERuleQueryTab(tab.TableResultTabWidget):
tab_title = "Type Enforcement Rule Query"
mlsonly = False
- def __init__(self, policy: "setools.SELinuxPolicy", _, /, *,
+ def __init__(self, policy: setools.SELinuxPolicy, /, *,
parent: QtWidgets.QWidget | None = None) -> None:
- super().__init__(setools.TERuleQuery(policy), None, enable_criteria=True, parent=parent)
+ super().__init__(setools.TERuleQuery(policy), enable_criteria=True, parent=parent)
self.setWhatsThis("Search Type Enforcement rules in a SELinux policy.")
@@ -190,7 +190,7 @@ if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mw = QtWidgets.QMainWindow()
- widget = TERuleQueryTab(setools.SELinuxPolicy(), mw)
+ widget = TERuleQueryTab(setools.SELinuxPolicy(), parent=mw)
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/tests-gui/widgets/test_boolquery.py b/tests-gui/widgets/test_boolquery.py
index 770bb98..1de0737 100644
--- a/tests-gui/widgets/test_boolquery.py
+++ b/tests-gui/widgets/test_boolquery.py
@@ -14,7 +14,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> BoolQue
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = BoolQueryTab(mock_policy, None, **kwargs)
+ w = BoolQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_commonquery.py b/tests-gui/widgets/test_commonquery.py
index 5995c74..756dd53 100644
--- a/tests-gui/widgets/test_commonquery.py
+++ b/tests-gui/widgets/test_commonquery.py
@@ -14,7 +14,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> CommonQ
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = CommonQueryTab(mock_policy, None, **kwargs)
+ w = CommonQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_constraintquery.py b/tests-gui/widgets/test_constraintquery.py
index 7889a92..880b965 100644
--- a/tests-gui/widgets/test_constraintquery.py
+++ b/tests-gui/widgets/test_constraintquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Constra
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = ConstraintQueryTab(mock_policy, None, **kwargs)
+ w = ConstraintQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_fsusequery.py b/tests-gui/widgets/test_fsusequery.py
index 1f42b30..044e3a4 100644
--- a/tests-gui/widgets/test_fsusequery.py
+++ b/tests-gui/widgets/test_fsusequery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> FSUseQu
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = FSUseQueryTab(mock_policy, None, **kwargs)
+ w = FSUseQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_genfsconquery.py b/tests-gui/widgets/test_genfsconquery.py
index 846812c..fe4ff3b 100644
--- a/tests-gui/widgets/test_genfsconquery.py
+++ b/tests-gui/widgets/test_genfsconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Genfsco
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = GenfsconQueryTab(mock_policy, None, **kwargs)
+ w = GenfsconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_ibendportconquery.py b/tests-gui/widgets/test_ibendportconquery.py
index fcc6c17..1427c9d 100644
--- a/tests-gui/widgets/test_ibendportconquery.py
+++ b/tests-gui/widgets/test_ibendportconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Ibendpo
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = IbendportconQueryTab(mock_policy, None, **kwargs)
+ w = IbendportconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_ibpkeyconquery.py b/tests-gui/widgets/test_ibpkeyconquery.py
index ee31e25..ec94f06 100644
--- a/tests-gui/widgets/test_ibpkeyconquery.py
+++ b/tests-gui/widgets/test_ibpkeyconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Ibpkeyc
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = IbpkeyconQueryTab(mock_policy, None, **kwargs)
+ w = IbpkeyconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_initialsidquery.py b/tests-gui/widgets/test_initialsidquery.py
index 0bbb195..b269123 100644
--- a/tests-gui/widgets/test_initialsidquery.py
+++ b/tests-gui/widgets/test_initialsidquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Initial
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = InitialSIDQueryTab(mock_policy, None, **kwargs)
+ w = InitialSIDQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_mlsrulequery.py b/tests-gui/widgets/test_mlsrulequery.py
index 32d4822..1e81f44 100644
--- a/tests-gui/widgets/test_mlsrulequery.py
+++ b/tests-gui/widgets/test_mlsrulequery.py
@@ -13,7 +13,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> MLSRule
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = MLSRuleQueryTab(mock_policy, None, **kwargs)
+ w = MLSRuleQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_netifconquery.py b/tests-gui/widgets/test_netifconquery.py
index 16f39d1..29ff09d 100644
--- a/tests-gui/widgets/test_netifconquery.py
+++ b/tests-gui/widgets/test_netifconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Netifco
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = NetifconQueryTab(mock_policy, None, **kwargs)
+ w = NetifconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_nodeconquery.py b/tests-gui/widgets/test_nodeconquery.py
index 85f392b..cafac27 100644
--- a/tests-gui/widgets/test_nodeconquery.py
+++ b/tests-gui/widgets/test_nodeconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Nodecon
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = NodeconQueryTab(mock_policy, None, **kwargs)
+ w = NodeconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_portconquery.py b/tests-gui/widgets/test_portconquery.py
index b10cb1b..f66b7d9 100644
--- a/tests-gui/widgets/test_portconquery.py
+++ b/tests-gui/widgets/test_portconquery.py
@@ -15,7 +15,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> Portcon
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = PortconQueryTab(mock_policy, None, **kwargs)
+ w = PortconQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_rbacrulequery.py b/tests-gui/widgets/test_rbacrulequery.py
index 93f95fe..e2f7ef9 100644
--- a/tests-gui/widgets/test_rbacrulequery.py
+++ b/tests-gui/widgets/test_rbacrulequery.py
@@ -13,7 +13,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> RBACRul
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = RBACRuleQueryTab(mock_policy, None, **kwargs)
+ w = RBACRuleQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_tab.py b/tests-gui/widgets/test_tab.py
index 777db96..27dffb6 100644
--- a/tests-gui/widgets/test_tab.py
+++ b/tests-gui/widgets/test_tab.py
@@ -14,7 +14,7 @@ def base_widget(mock_policy, request: pytest.FixtureRequest,
"""Pytest fixture to set up the BaseAnalysisTabWidget widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = tab.BaseAnalysisTabWidget(mock_policy, None, **kwargs)
+ w = tab.BaseAnalysisTabWidget(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
@@ -26,7 +26,7 @@ def table_widget(mock_policy, request: pytest.FixtureRequest,
"""Pytest fixture to set up the TableResultTabWidget widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = tab.TableResultTabWidget(mock_policy, None, **kwargs)
+ w = tab.TableResultTabWidget(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w
diff --git a/tests-gui/widgets/test_terulequery.py b/tests-gui/widgets/test_terulequery.py
index 9689b22..5159e36 100644
--- a/tests-gui/widgets/test_terulequery.py
+++ b/tests-gui/widgets/test_terulequery.py
@@ -13,7 +13,7 @@ def widget(mock_policy, request: pytest.FixtureRequest, qtbot: QtBot) -> TERuleQ
"""Pytest fixture to set up the widget."""
marker = request.node.get_closest_marker("obj_args")
kwargs = marker.kwargs if marker else {}
- w = TERuleQueryTab(mock_policy, None, **kwargs)
+ w = TERuleQueryTab(mock_policy, **kwargs)
qtbot.addWidget(w)
w.show()
return w