kunit: tool: add subscripts for type annotations where appropriate
authorDaniel Latypov <dlatypov@google.com>
Thu, 16 Mar 2023 22:06:36 +0000 (15:06 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 17 Mar 2023 18:28:18 +0000 (12:28 -0600)
commit695e26030858b27648ca107b77095fed53377b4b
tree91b9013eb212a106fff413dd3ae22e88ab3a796c
parent2c6a96dad5797e57b4cf04101d6c8d5c7a571603
kunit: tool: add subscripts for type annotations where appropriate

E.g. for subprocess.Popen, it can be opened in `text=True` mode where it
returns strings, or `text=False` where it returns bytes.
To differentiate, you can annotate types as `Popen[str]` or
`Popen[bytes]`.

This patch should add subscripts in all the places we were missing them.

Reported-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/linux-kselftest/20230315105055.9b2be0153625.I7a2cb99b95dff216c0feed4604255275e0b156a7@changeid/
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_kernel.py
tools/testing/kunit/kunit_printer.py
tools/testing/kunit/run_checks.py