The RangedCriteriaWidget will, generically, handle entering ranges of
objects. This is in preparation for adding a port range criteria
widget.
Split MLSLevelRangeWidget into MLSRangeName and MLSLevelName since levels
can have a more specific validator.
Also add options placement field.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
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>
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>
* Remove "Model" from names of model classes.
* Remove remaining *_detail() functions.
* Add typing.
* Make models dir a package.
* Update for superclass data() method as fallback.
* Switch to match/case statements.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>