Change on_clear_completion_selection() back to call the Qt getter instead of our one that does an assert not None check, it already handles None being returned fine
Add a half-hearted unit test (which was failing previously because of the assertion error)
I didn't put much effort into reproducing it beyond manually hammering the completion in a temp basedir (possibly if the completion was slower because of more items it would be easier to reproduce). That commit history was pretty clear, we've always handled this situation (whatever it is) until adapting to type hints recently.
An alternate implementation is adding an allow_none or similar kwarg to our getter.
on_clear_completion_selection()
back to call the Qt getter instead of our one that does anassert not None
check, it already handles None being returned fineI didn't put much effort into reproducing it beyond manually hammering the completion in a temp basedir (possibly if the completion was slower because of more items it would be easier to reproduce). That commit history was pretty clear, we've always handled this situation (whatever it is) until adapting to type hints recently. An alternate implementation is adding an
allow_none
or similar kwarg to our getter.Fixes: https://github.com/qutebrowser/qutebrowser/issues/7901