From 8df3dbe1128987de6aec5ba643c397f811346d51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?=
Date: Tue, 1 Oct 2024 17:20:57 +0200
Subject: [PATCH] Fix typos
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Found by codespell(1) and typos[1].
[1]: https://github.com/crate-ci/typos
Signed-off-by: Christian Göttsche
---
ChangeLog | 2 +-
man/sediff.1 | 2 +-
man/seinfo.1 | 2 +-
sediff | 2 +-
setools/checker/checkermodule.py | 2 +-
setools/dta.py | 4 ++--
setools/infoflow.py | 2 +-
setools/policyrep/object.pxi | 6 +++---
setools/policyrep/terule.pxi | 2 +-
setools/query.py | 2 +-
setoolsgui/widgets/commonquery.py | 2 +-
setoolsgui/widgets/criteria/boolean.py | 2 +-
setoolsgui/widgets/criteria/boundsruletype.py | 2 +-
setoolsgui/widgets/criteria/comboenum.py | 2 +-
setoolsgui/widgets/criteria/common.py | 2 +-
setoolsgui/widgets/criteria/constraintype.py | 2 +-
setoolsgui/widgets/criteria/context.py | 2 +-
setoolsgui/widgets/criteria/defaultruletype.py | 2 +-
setoolsgui/widgets/criteria/defaultvalue.py | 2 +-
setoolsgui/widgets/criteria/fsuseruletype.py | 2 +-
setoolsgui/widgets/criteria/infiniband.py | 2 +-
setoolsgui/widgets/criteria/ipnetwork.py | 2 +-
setoolsgui/widgets/criteria/ipports.py | 2 +-
setoolsgui/widgets/criteria/list.py | 2 +-
setoolsgui/widgets/criteria/mlslevelrange.py | 2 +-
setoolsgui/widgets/criteria/mlsruletype.py | 2 +-
setoolsgui/widgets/criteria/objclass.py | 2 +-
setoolsgui/widgets/criteria/permission.py | 2 +-
setoolsgui/widgets/criteria/radioenum.py | 2 +-
setoolsgui/widgets/criteria/ranged.py | 2 +-
setoolsgui/widgets/criteria/rbacruletype.py | 2 +-
setoolsgui/widgets/criteria/role.py | 2 +-
setoolsgui/widgets/criteria/teruletype.py | 2 +-
setoolsgui/widgets/criteria/type.py | 2 +-
setoolsgui/widgets/criteria/user.py | 2 +-
setoolsgui/widgets/dta.html | 2 +-
setoolsgui/widgets/excludetypes.py | 2 +-
setoolsgui/widgets/infoflow.html | 2 +-
setoolsgui/widgets/permmap.py | 2 +-
setoolsgui/widgets/userquery.py | 2 +-
tests/library/checker/test_assertrbac.py | 2 +-
tests/library/checker/test_assertte.py | 4 ++--
tests/library/checker/test_roexec.py | 2 +-
tests/library/dta.conf | 4 ++--
tests/library/policyrep/test_common.py | 2 +-
tests/library/policyrep/test_objclass.py | 6 +++---
tests/library/policyrep/test_selinuxpolicy.py | 6 +++---
47 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d5d8a334..c02d8d1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -103,7 +103,7 @@
This release focused on improving performance and reducing memory usage.
A Cython-based policy representation replaced the
- Python/SWIG/static-linked-libsepol implemention. SETools no longer statically
+ Python/SWIG/static-linked-libsepol implementation. SETools no longer statically
links to libsepol, though it is strongly suggested that users rebuild SETools
after updating libsepol, in case the policy structure changes.
diff --git a/man/sediff.1 b/man/sediff.1
index 9b189885..21cc7154 100644
--- a/man/sediff.1
+++ b/man/sediff.1
@@ -87,7 +87,7 @@ Find differences in mlsvalidatetrans rules.
.IP "--ibendportcon"
Find differences in ibendportcon (InfiniBand endport context) statements.
.IP "--ibpkeycon"
-Find differences in ibpkeycon (InfiniBand parition key context) statements.
+Find differences in ibpkeycon (InfiniBand partition key context) statements.
.IP "--initialsid"
Find differences in initial SID statements.
.IP "--fs_use"
diff --git a/man/seinfo.1 b/man/seinfo.1
index 9e7cbde8..a68f9d06 100644
--- a/man/seinfo.1
+++ b/man/seinfo.1
@@ -57,7 +57,7 @@ There is no expanded information for this component.
Print a list of genfscon statements or, if FS_TYPE is provided, print the statement for the named filesystem type.
There is no expanded information for this component.
.IP "--ibpkeycon [PKEY[-PKEY]]"
-Print a list of InfiniBand parition key contexts.
+Print a list of InfiniBand partition key contexts.
.IP "--ibendportcon [NAME]"
Print a list of InfiniBand endport contexts.
.IP "--initialsid [NAME]"
diff --git a/sediff b/sediff
index 0fdd939f..131e3eaa 100755
--- a/sediff
+++ b/sediff
@@ -532,7 +532,7 @@ try:
nm = len(diff.modified_sensitivities)
print(f"Sensitivities ({na} Added, {nr} Removed, {nm} Modified)")
if diff.added_sensitivities and not args.stats:
- print(f" Added Sensitivites: {na}")
+ print(f" Added Sensitivities: {na}")
for sens in sorted(diff.added_sensitivities):
print(f" + {sens}")
if diff.removed_sensitivities and not args.stats:
diff --git a/setools/checker/checkermodule.py b/setools/checker/checkermodule.py
index ea21430b..35397049 100644
--- a/setools/checker/checkermodule.py
+++ b/setools/checker/checkermodule.py
@@ -96,7 +96,7 @@ def log_info(self, msg: str) -> None:
def log_ok(self, msg: str) -> None:
"""
Log findings that pass the check. By default these messages are
- surpressed unless self.log_passing is True.
+ suppressed unless self.log_passing is True.
"""
if self.log_passing:
self.output.write(f"P * {msg}\n")
diff --git a/setools/dta.py b/setools/dta.py
index 4f27e34c..31475268 100644
--- a/setools/dta.py
+++ b/setools/dta.py
@@ -164,7 +164,7 @@ def __init__(self, policy: policyrep.SELinuxPolicy, /, *,
self.subG = self.G.copy()
except NameError:
self.log.critical("NetworkX is not available. This is "
- "requried for Domain Transition Analysis.")
+ "required for Domain Transition Analysis.")
self.log.critical("This is typically in the python3-networkx package.")
raise
@@ -690,7 +690,7 @@ class Edge(mixins.NetworkXGraphEdge):
Parameters:
graph The NetworkX graph.
source The source type of the edge.
- target The target tyep of the edge.
+ target The target type of the edge.
Keyword Parameters:
create (T/F) create the edge if it does not exist.
diff --git a/setools/infoflow.py b/setools/infoflow.py
index 1a5be2e5..20b04763 100644
--- a/setools/infoflow.py
+++ b/setools/infoflow.py
@@ -91,7 +91,7 @@ def __init__(self, policy: policyrep.SELinuxPolicy, perm_map: permmap.Permission
self.subG = self.G.copy()
except NameError:
self.log.critical("NetworkX is not available. This is "
- "requried for Information Flow Analysis.")
+ "required for Information Flow Analysis.")
self.log.critical("This is typically in the python3-networkx package.")
raise
diff --git a/setools/policyrep/object.pxi b/setools/policyrep/object.pxi
index 944359b2..b869d727 100644
--- a/setools/policyrep/object.pxi
+++ b/setools/policyrep/object.pxi
@@ -120,7 +120,7 @@ cdef class EbitmapIterator(PolicyIterator):
"""
Base class for iterators over hash tables.
- Sublcasses must provide their own __next__, which calls this class's __next__
+ Subclasses must provide their own __next__, which calls this class's __next__
and then uses a factory function to build and return an object from self.curr.
For example:
@@ -177,7 +177,7 @@ cdef class HashtabIterator(PolicyIterator):
"""
Base class for iterators over hash tables.
- Sublcasses must provide their own __next__, which calls this class's __next__
+ Subclasses must provide their own __next__, which calls this class's __next__
and then uses a factory function to build and return an object from self.curr.
For example:
@@ -243,7 +243,7 @@ cdef class OcontextIterator(PolicyIterator):
"""
Base class for iterators for most in-policy labeling statements, (portcon, nodecon, etc.)
- Sublcasses must provide their own __next__, which calls this class's __next__
+ Subclasses must provide their own __next__, which calls this class's __next__
and then uses a factory function to build and return an object from self.ocon.
For example:
diff --git a/setools/policyrep/terule.pxi b/setools/policyrep/terule.pxi
index e6bbcb0f..384c0743 100644
--- a/setools/policyrep/terule.pxi
+++ b/setools/policyrep/terule.pxi
@@ -222,7 +222,7 @@ cdef class IoctlSet(frozenset):
def __format__(self, spec):
"""
- String formating.
+ String formatting.
The standard formatting (no specification) will render the
ranges of ioctls, space separated.
diff --git a/setools/query.py b/setools/query.py
index 4e042f48..2c2b7428 100644
--- a/setools/query.py
+++ b/setools/query.py
@@ -23,7 +23,7 @@ def __init__(self, policy: "SELinuxPolicy", **kwargs) -> None:
# keys are sorted in reverse order so regex settings
# are set before the criteria, e.g. name_regex
# is set before name. This ensures correct behavior
- # since the criteria descriptors are sensitve to
+ # since the criteria descriptors are sensitive to
# regex settings.
for name in sorted(kwargs.keys(), reverse=True):
attr = getattr(self, name, None) # None is not callable
diff --git a/setoolsgui/widgets/commonquery.py b/setoolsgui/widgets/commonquery.py
index d654168f..11ab82c0 100644
--- a/setoolsgui/widgets/commonquery.py
+++ b/setoolsgui/widgets/commonquery.py
@@ -13,7 +13,7 @@ class CommonQueryTab(tab.TableResultTabWidget[setools.CommonQuery, setools.Commo
"""A common permission set query."""
section = tab.AnalysisSection.Components
- tab_title = "Common Permision Sets"
+ tab_title = "Common Permission Sets"
mlsonly = False
def __init__(self, policy: setools.SELinuxPolicy, /, *,
diff --git a/setoolsgui/widgets/criteria/boolean.py b/setoolsgui/widgets/criteria/boolean.py
index c0a6a86a..5cfabf38 100644
--- a/setoolsgui/widgets/criteria/boolean.py
+++ b/setoolsgui/widgets/criteria/boolean.py
@@ -88,7 +88,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
layout.addWidget(widget2)
layout.addWidget(widget3)
window.setToolTip("test tooltip")
- window.setWhatsThis("test whats this")
+ window.setWhatsThis("test what's this")
mw.setCentralWidget(window)
mw.resize(window.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/boundsruletype.py b/setoolsgui/widgets/criteria/boundsruletype.py
index 15f883db..9ef5fe7a 100644
--- a/setoolsgui/widgets/criteria/boundsruletype.py
+++ b/setoolsgui/widgets/criteria/boundsruletype.py
@@ -54,7 +54,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = BoundsRuleType("Test default ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/comboenum.py b/setoolsgui/widgets/criteria/comboenum.py
index dd18567a..26c331ed 100644
--- a/setoolsgui/widgets/criteria/comboenum.py
+++ b/setoolsgui/widgets/criteria/comboenum.py
@@ -50,7 +50,7 @@ class local_enum_class(enum.Enum):
mw = QtWidgets.QMainWindow()
widget = ComboEnumWidget("Test radio enum", q, "radioattrname", local_enum_class, parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/common.py b/setoolsgui/widgets/criteria/common.py
index 007b95f5..5cb343fe 100644
--- a/setoolsgui/widgets/criteria/common.py
+++ b/setoolsgui/widgets/criteria/common.py
@@ -47,7 +47,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = CommonName("Test Common", q, "name", parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/constraintype.py b/setoolsgui/widgets/criteria/constraintype.py
index 59af2ac7..beb66a2a 100644
--- a/setoolsgui/widgets/criteria/constraintype.py
+++ b/setoolsgui/widgets/criteria/constraintype.py
@@ -51,7 +51,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = ConstrainType("Test constrain ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/context.py b/setoolsgui/widgets/criteria/context.py
index 841440cb..893f3e26 100644
--- a/setoolsgui/widgets/criteria/context.py
+++ b/setoolsgui/widgets/criteria/context.py
@@ -143,7 +143,7 @@ def load(self, settings: dict) -> None:
mw = QtWidgets.QMainWindow()
widget = ContextMatch("Test Context Match", q, parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/defaultruletype.py b/setoolsgui/widgets/criteria/defaultruletype.py
index 07f0e787..688fbe03 100644
--- a/setoolsgui/widgets/criteria/defaultruletype.py
+++ b/setoolsgui/widgets/criteria/defaultruletype.py
@@ -55,7 +55,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = DefaultRuleType("Test default ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/defaultvalue.py b/setoolsgui/widgets/criteria/defaultvalue.py
index e5d73ba6..0ed6dac0 100644
--- a/setoolsgui/widgets/criteria/defaultvalue.py
+++ b/setoolsgui/widgets/criteria/defaultvalue.py
@@ -85,7 +85,7 @@ def load(self, settings: dict) -> None:
widget1 = DefaultValues("Test default values", q1, "default", "default_range", parent=window)
layout.addWidget(widget1)
window.setToolTip("test tooltip")
- window.setWhatsThis("test whats this")
+ window.setWhatsThis("test what's this")
mw.setCentralWidget(window)
mw.resize(window.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/fsuseruletype.py b/setoolsgui/widgets/criteria/fsuseruletype.py
index 937ea0d9..f2ac4184 100644
--- a/setoolsgui/widgets/criteria/fsuseruletype.py
+++ b/setoolsgui/widgets/criteria/fsuseruletype.py
@@ -52,7 +52,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = FSUseRuletype("Test fs_use_* ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/infiniband.py b/setoolsgui/widgets/criteria/infiniband.py
index c21a7a89..665f874a 100644
--- a/setoolsgui/widgets/criteria/infiniband.py
+++ b/setoolsgui/widgets/criteria/infiniband.py
@@ -127,7 +127,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = IB_EndPortName("Test endport", q, "port", parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/ipnetwork.py b/setoolsgui/widgets/criteria/ipnetwork.py
index d87ebd65..9626bddb 100644
--- a/setoolsgui/widgets/criteria/ipnetwork.py
+++ b/setoolsgui/widgets/criteria/ipnetwork.py
@@ -21,7 +21,7 @@
class IP_NetworkName(NameWidget):
"""
- Base classs for widgets providing a QLineEdit that saves the input to the attributes
+ Base class for widgets providing a QLineEdit that saves the input to the attributes
of the specified query. This supports inputs of IP networks, IPv4 or IPv6.
"""
diff --git a/setoolsgui/widgets/criteria/ipports.py b/setoolsgui/widgets/criteria/ipports.py
index a2a06892..6c007685 100644
--- a/setoolsgui/widgets/criteria/ipports.py
+++ b/setoolsgui/widgets/criteria/ipports.py
@@ -84,7 +84,7 @@ def set_criteria(self) -> None:
mw = QtWidgets.QMainWindow()
widget = IP_PortName("Test Range", q, "default", enable_range_opts=True, parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/list.py b/setoolsgui/widgets/criteria/list.py
index 8edff45d..29bb7e75 100644
--- a/setoolsgui/widgets/criteria/list.py
+++ b/setoolsgui/widgets/criteria/list.py
@@ -76,7 +76,7 @@ def __init__(self, title: str, query, attrname: str, model: models.SEToolsTableM
self.criteria_any.setChecked(not any((EQUAL_DEFAULT_CHECKED, SUBSET_DEFAULT_CHECKED)))
self.top_layout.addWidget(self.criteria_any, 0, 2, 1, 1)
- # the rstrip("_") below is to aviod names like "name__equal"
+ # the rstrip("_") below is to avoid names like "name__equal"
if enable_equal:
self.criteria_equal = QtWidgets.QRadioButton(self)
self.criteria_equal.setObjectName(f"{self.attrname.rstrip('_')}_equal")
diff --git a/setoolsgui/widgets/criteria/mlslevelrange.py b/setoolsgui/widgets/criteria/mlslevelrange.py
index c1d3b1ee..5d67e95b 100644
--- a/setoolsgui/widgets/criteria/mlslevelrange.py
+++ b/setoolsgui/widgets/criteria/mlslevelrange.py
@@ -137,7 +137,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = MLSRangeName("Test Range", q, "default", enable_range_opts=True, parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/mlsruletype.py b/setoolsgui/widgets/criteria/mlsruletype.py
index a7cd6956..7eaeec31 100644
--- a/setoolsgui/widgets/criteria/mlsruletype.py
+++ b/setoolsgui/widgets/criteria/mlsruletype.py
@@ -52,7 +52,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = MLSRuleType("Test MLS ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/objclass.py b/setoolsgui/widgets/criteria/objclass.py
index 805e45ec..223381b6 100644
--- a/setoolsgui/widgets/criteria/objclass.py
+++ b/setoolsgui/widgets/criteria/objclass.py
@@ -68,7 +68,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = ObjClassList("Test Classes", q, "tclass", parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/permission.py b/setoolsgui/widgets/criteria/permission.py
index 0297d7fe..de8ca5f1 100644
--- a/setoolsgui/widgets/criteria/permission.py
+++ b/setoolsgui/widgets/criteria/permission.py
@@ -116,7 +116,7 @@ def load(self, settings: dict) -> None:
layout.addWidget(widget1)
layout.addWidget(widget2)
window.setToolTip("test tooltip")
- window.setWhatsThis("test whats this")
+ window.setWhatsThis("test what's this")
mw.setCentralWidget(window)
mw.resize(window.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/radioenum.py b/setoolsgui/widgets/criteria/radioenum.py
index d69aa74b..151ebe58 100644
--- a/setoolsgui/widgets/criteria/radioenum.py
+++ b/setoolsgui/widgets/criteria/radioenum.py
@@ -112,7 +112,7 @@ class local_enum_class(enum.Enum):
mw = QtWidgets.QMainWindow()
widget = RadioEnumWidget("Test radio enum", q, "radioattrname", local_enum_class, parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/ranged.py b/setoolsgui/widgets/criteria/ranged.py
index bdb3fae8..26601eb2 100644
--- a/setoolsgui/widgets/criteria/ranged.py
+++ b/setoolsgui/widgets/criteria/ranged.py
@@ -13,7 +13,7 @@
class RangedWidget(NameWidget):
"""
- Base classs for widgets providing a QLineEdit that saves the input to the attributes
+ Base class for widgets providing a QLineEdit that saves the input to the attributes
of the specified query. This supports inputs of ranges, e.g. port ranges and MLS ranges.
"""
diff --git a/setoolsgui/widgets/criteria/rbacruletype.py b/setoolsgui/widgets/criteria/rbacruletype.py
index 09aa55bb..a4bfd9d3 100644
--- a/setoolsgui/widgets/criteria/rbacruletype.py
+++ b/setoolsgui/widgets/criteria/rbacruletype.py
@@ -53,7 +53,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = RBACRuleType("Test RBAC ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/role.py b/setoolsgui/widgets/criteria/role.py
index 61fda73b..23076bbe 100644
--- a/setoolsgui/widgets/criteria/role.py
+++ b/setoolsgui/widgets/criteria/role.py
@@ -68,7 +68,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = RoleName("Test Role", q, "source", parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/teruletype.py b/setoolsgui/widgets/criteria/teruletype.py
index e4102ba2..a2a8b75c 100644
--- a/setoolsgui/widgets/criteria/teruletype.py
+++ b/setoolsgui/widgets/criteria/teruletype.py
@@ -70,7 +70,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str = "rule
mw = QtWidgets.QMainWindow()
w = TERuleType("Test TE ruletypes", q, parent=mw)
w.setToolTip("test tooltip")
- w.setWhatsThis("test whats this")
+ w.setWhatsThis("test what's this")
mw.setCentralWidget(w)
mw.resize(w.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/type.py b/setoolsgui/widgets/criteria/type.py
index ec8601b2..193e11a9 100644
--- a/setoolsgui/widgets/criteria/type.py
+++ b/setoolsgui/widgets/criteria/type.py
@@ -202,7 +202,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
widget = TypeOrAttrName("Test Type/Attribute", q, "source", parent=mw,
enable_regex=True, enable_indirect=True)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/criteria/user.py b/setoolsgui/widgets/criteria/user.py
index 8775e2e4..d17d8f0a 100644
--- a/setoolsgui/widgets/criteria/user.py
+++ b/setoolsgui/widgets/criteria/user.py
@@ -49,7 +49,7 @@ def __init__(self, title: str, query: setools.PolicyQuery, attrname: str, /, *,
mw = QtWidgets.QMainWindow()
widget = UserName("Test user", q, "user", parent=mw)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
mw.setCentralWidget(widget)
mw.resize(widget.size())
whatsthis = QtWidgets.QWhatsThis.createAction(mw)
diff --git a/setoolsgui/widgets/dta.html b/setoolsgui/widgets/dta.html
index 6f31fa85..a840024a 100644
--- a/setoolsgui/widgets/dta.html
+++ b/setoolsgui/widgets/dta.html
@@ -110,7 +110,7 @@ Transitions on Setcon()
to determine allowed transitions.
The criteria for an allowed dynamic domain transition are as
-follows. In the examples below, assume souce_t
is the source type
+follows. In the examples below, assume source_t
is the source type
and, target_t
is the target type.
diff --git a/setoolsgui/widgets/excludetypes.py b/setoolsgui/widgets/excludetypes.py
index c5e08911..2354164d 100644
--- a/setoolsgui/widgets/excludetypes.py
+++ b/setoolsgui/widgets/excludetypes.py
@@ -263,7 +263,7 @@ def filterAcceptsRow(self, row: int, parent: QtCore.QModelIndex) -> bool:
app = QtWidgets.QApplication(sys.argv)
widget = ExcludeTypes(a)
widget.setToolTip("test tooltip")
- widget.setWhatsThis("test whats this")
+ widget.setWhatsThis("test what's this")
widget.resize(620, 340)
widget.show()
sys.exit(app.exec())
diff --git a/setoolsgui/widgets/infoflow.html b/setoolsgui/widgets/infoflow.html
index a964c045..c00d6839 100644
--- a/setoolsgui/widgets/infoflow.html
+++ b/setoolsgui/widgets/infoflow.html
@@ -278,4 +278,4 @@ Finding more flows
Additionally, the analysis can be constrained by number of results. The
Limit Results option will stop the analysis if the specified
-number of results is reached. There is no idication if there are more results
+number of results is reached. There is no indication if there are more results
diff --git a/setoolsgui/widgets/permmap.py b/setoolsgui/widgets/permmap.py
index 6500f2f8..0f923acf 100644
--- a/setoolsgui/widgets/permmap.py
+++ b/setoolsgui/widgets/permmap.py
@@ -147,7 +147,7 @@ def class_selected(self) -> None:
self.perm_mappings.addWidget(mapping)
self.widgets.append(mapping)
- # add horizonal line
+ # add horizontal line
line = QtWidgets.QFrame(self)
line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
diff --git a/setoolsgui/widgets/userquery.py b/setoolsgui/widgets/userquery.py
index 6f30ebc0..1418c85a 100644
--- a/setoolsgui/widgets/userquery.py
+++ b/setoolsgui/widgets/userquery.py
@@ -49,7 +49,7 @@ def __init__(self, policy: setools.SELinuxPolicy, /, *,
lvl.setToolTip("MLS is disabled in this policy.")
lvl.setWhatsThis(
"""
- This MLS lavel for user matching is not available because
+
This MLS level for user matching is not available because
MLS is disabled in this policy.
""")
diff --git a/tests/library/checker/test_assertrbac.py b/tests/library/checker/test_assertrbac.py
index 53540d19..ce5107bc 100644
--- a/tests/library/checker/test_assertrbac.py
+++ b/tests/library/checker/test_assertrbac.py
@@ -67,7 +67,7 @@ def test_exempt_source(self, compiled_policy: setools.SELinuxPolicy) -> None:
assert expected == check.exempt_source
def test_exempt_source_missing(self, compiled_policy: setools.SELinuxPolicy) -> None:
- """Test exempt_source missing role is ignroed."""
+ """Test exempt_source missing role is ignored."""
config = {"source": "system",
"exempt_source": "FAIL exempt_src2"}
check = setools.checker.assertrbac.AssertRBAC(
diff --git a/tests/library/checker/test_assertte.py b/tests/library/checker/test_assertte.py
index bd23a8e1..b9500f2f 100644
--- a/tests/library/checker/test_assertte.py
+++ b/tests/library/checker/test_assertte.py
@@ -66,7 +66,7 @@ def test_exempt_source(self, compiled_policy: setools.SELinuxPolicy) -> None:
assert expected == check.exempt_source
def test_source_missing_ignored(self, compiled_policy: setools.SELinuxPolicy) -> None:
- """Test exempt_source missing type is ignroed."""
+ """Test exempt_source missing type is ignored."""
config = {"source": "system",
"exempt_source": "FAIL exempt_src2"}
check = setools.checker.assertte.AssertTE(
@@ -88,7 +88,7 @@ def test_exempt_target(self, compiled_policy: setools.SELinuxPolicy) -> None:
assert expected == check.exempt_target
def test_target_missing_ignored(self, compiled_policy: setools.SELinuxPolicy) -> None:
- """Test exempt_target missing type is ignroed."""
+ """Test exempt_target missing type is ignored."""
config = {"target": "system",
"exempt_target": "FAIL exempt_tgt2"}
check = setools.checker.assertte.AssertTE(
diff --git a/tests/library/checker/test_roexec.py b/tests/library/checker/test_roexec.py
index 6a44f47a..b454ed4f 100644
--- a/tests/library/checker/test_roexec.py
+++ b/tests/library/checker/test_roexec.py
@@ -25,7 +25,7 @@ def test_all_exec(self, compiled_policy: setools.SELinuxPolicy) -> None:
compiled_policy, "test_all_exec", config)
result = check._collect_executables()
- # becasue of unconfined, nonexec is executable
+ # because of unconfined, nonexec is executable
expected = set(("roexec", "execfile1", "execfile2", "nonexec", "exempt_file"))
assert expected == set(result.keys())
diff --git a/tests/library/dta.conf b/tests/library/dta.conf
index cb864880..9ed6f1a1 100644
--- a/tests/library/dta.conf
+++ b/tests/library/dta.conf
@@ -135,7 +135,7 @@ allow trans1 trans2_exec:file execute;
allow trans2 trans2_exec:file entrypoint;
# test 3
-# type_transiton and setexec trans2 -> trans3
+# type_transition and setexec trans2 -> trans3
# 2 entrypoints
type trans3;
type trans3_exec1;
@@ -186,7 +186,7 @@ allow dyntrans101 dyntrans102:process dyntransition;
# test 200
-# all transition possiblities dyntrans100 -> bothtrans200
+# all transition possibilities dyntrans100 -> bothtrans200
type bothtrans200;
type bothtrans200_exec;
allow dyntrans100 self:process { setexec setcurrent };
diff --git a/tests/library/policyrep/test_common.py b/tests/library/policyrep/test_common.py
index 81a78629..cac69730 100644
--- a/tests/library/policyrep/test_common.py
+++ b/tests/library/policyrep/test_common.py
@@ -19,7 +19,7 @@ def test_perms(self, compiled_policy: setools.SELinuxPolicy) -> None:
com = list(compiled_policy.commons()).pop()
assert set(["low_w", "low_r"]) == com.perms, com.perms
- def test_statment(self, compiled_policy: setools.SELinuxPolicy) -> None:
+ def test_statement(self, compiled_policy: setools.SELinuxPolicy) -> None:
"""Common: statement."""
com = list(compiled_policy.commons()).pop()
assert com.statement() in (
diff --git a/tests/library/policyrep/test_objclass.py b/tests/library/policyrep/test_objclass.py
index 92df9114..f28ded82 100644
--- a/tests/library/policyrep/test_objclass.py
+++ b/tests/library/policyrep/test_objclass.py
@@ -19,7 +19,7 @@ def test_perms(self, compiled_policy: setools.SELinuxPolicy) -> None:
cls = compiled_policy.lookup_class("infoflow8")
assert frozenset(["super_w", "super_r"]) == cls.perms, f"{cls.perms}"
- def test_statment_wo_common_w_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
+ def test_statement_wo_common_w_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
"""ObjClass: statement, no common."""
cls = compiled_policy.lookup_class("infoflow8")
assert cls.statement() in (
@@ -27,7 +27,7 @@ def test_statment_wo_common_w_unique(self, compiled_policy: setools.SELinuxPolic
"class infoflow8\n{\n\tsuper_r\n\tsuper_w\n}"), \
cls.statement()
- def test_statment_w_common_w_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
+ def test_statement_w_common_w_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
"""ObjClass: statement, with common."""
cls = compiled_policy.lookup_class("infoflow6")
assert cls.statement() in (
@@ -35,7 +35,7 @@ def test_statment_w_common_w_unique(self, compiled_policy: setools.SELinuxPolicy
"class infoflow6\ninherits com_b\n{\n\tperm2\n\tperm1\n}"), \
cls.statement()
- def test_statment_w_common_wo_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
+ def test_statement_w_common_wo_unique(self, compiled_policy: setools.SELinuxPolicy) -> None:
"""ObjClass: statement, with common, no class perms."""
cls = compiled_policy.lookup_class("infoflow5")
assert cls.statement() == "class infoflow5\ninherits com_a\n", cls.statement()
diff --git a/tests/library/policyrep/test_selinuxpolicy.py b/tests/library/policyrep/test_selinuxpolicy.py
index 9d8ebfde..67ae328a 100644
--- a/tests/library/policyrep/test_selinuxpolicy.py
+++ b/tests/library/policyrep/test_selinuxpolicy.py
@@ -13,8 +13,8 @@
@pytest.mark.obj_args("tests/library/policyrep/selinuxpolicy.conf")
class TestSELinuxPolicy:
- def test_open_policy_non_existant(self) -> None:
- """SELinuxPolicy: Non existant policy on open."""
+ def test_open_policy_non_existent(self) -> None:
+ """SELinuxPolicy: Non existent policy on open."""
with pytest.raises(OSError):
setools.SELinuxPolicy("tests/policyrep/DOES_NOT_EXIST")
@@ -58,7 +58,7 @@ def test_class_count(self, compiled_policy: setools.SELinuxPolicy) -> None:
assert compiled_policy.class_count == 7
def test_common_count(self, compiled_policy: setools.SELinuxPolicy) -> None:
- """SELinuxPolicy: common permisison set count"""
+ """SELinuxPolicy: common permission set count"""
assert compiled_policy.common_count == 3
def test_conditional_count(self, compiled_policy: setools.SELinuxPolicy) -> None: