kunit: tool: fix pre-existing python type annotation errors
authorDaniel Latypov <dlatypov@google.com>
Wed, 21 Oct 2020 22:07:52 +0000 (15:07 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 10 Nov 2020 20:11:28 +0000 (13:11 -0700)
commitb7e0b983ff13714d261883e89910b0755eb12169
treef43db605a256bb739f318f01ffba1dd0db8df835
parent3959d0a63b3202ea2aa12b3f6effd5400d773d31
kunit: tool: fix pre-existing python type annotation errors

The code uses annotations, but they aren't accurate.
Note that type checking in python is a separate process, running
`kunit.py run` will not check and complain about invalid types at
runtime.

Fix pre-existing issues found by running a type checker
$ mypy *.py

All but one of these were returning `None` without denoting this
properly (via `Optional[Type]`).

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py