Commit Graph

33 Commits

Author SHA1 Message Date
Chris PeBenito
031fe77df6 Enable some strict mypy options as a first step to fully strict mode.
Enable options that only require little to no code fixes.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
888144eecc ApolWorkspace: Update to use QMessageOnException.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
99a1cf3b50 Replace deprecated use of pkg_resources.
Replace with importlib.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
eb128f84d5 ApolWorkspace: Typing and style cleanup.
* Use general setools package import.
* Add more specific typing for Finals
* Add encodings for file open().

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
613e8e5a1f Add new implementations of CategoryQueryTab and SensitivityQueryTab.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
5ba9c2397a Add new BoundsQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
57f5f07e88 Add new DefaultQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
b83cafc1d8 Add new DomainTransitionAnalysisTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
91a41323e3 Add new UserQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
a363f76fd5 Add new TypeQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
4dcac27b09 Add new TypeAttributeQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
e237a97def Add new RoleQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
757165d515 Add new ObjClassQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
ffd28e90bb Remove permission map parameter from analysis tabs.
This is not the common case.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
5a88e29f29 Add new CommonQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
394a897410 Add new BoolQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
d6dee948ce Add new ConstraintQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
2b1c1429e7 Add new implemenation of FSUseQueryTab.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
9f569953a9 Add new GenfsconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
5571037c1e Add new NodeconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
8c683456f3 Add new IbpkeyconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
917c183b27 Add new IbendportconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
3b7c515bd3 Add new InitialSIDQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
ccae23f435 Add new NetifconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
c02b2628d7 Address issues uncovered by mypy 1.6.1.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
7e9d0fded9 Update to PyQt6.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
8217708cda Add new PortconQueryTab implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
cd24446963 setoolsgui: Address new errors in mypy 1.6.0.
Most come from the union-attr check, throwing errors because PyQt returns,
for example, "QObjecet | None", so code is using attributes on the PyQt
object that don't exist on None.

In some cases, classes gained new overridden method implementations that
do type narrowing to ensure a non-None object is returned.

This also includes a new QListView subclass with the above overrides.  With
the new class, there is some light refactoring in ListCriteriaWidget,
moving the selection methods to the new class.

The test code (unit tests and module __main__) simply ignore union-attr
errors, since we want that kind of runtime error to pop loudly.

There are some remaining issues, but they seem to be issues in the PyQt5
typing.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
3ffc134f16 Add new InfoFlowAnalysisTab implementation.
Also add constants to PermissionMap class.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
5f83443516 setoolsgui: Update to Python 3.10 typing syntax and features.
Also clean up lint warnings, such as missing docstrings and shadowing
variables in the __main__ (testing) functions.

No functional change.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-02-14 09:11:35 -05:00
Chris PeBenito
60d3423b2a Add new MLS rule query tab.
Also enhance tooltips and what's this in MLSRuleTableModel.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-01-31 10:11:55 -05:00
Chris PeBenito
537e6d9e69 Add new RBAC rule query tab.
Also enhance tooltips and what's this in RBACRuleTableModel.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-01-31 10:11:55 -05:00
Chris PeBenito
586117b10b Add new apol main window implementation.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2024-01-31 10:11:55 -05:00