summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/inc/resource.h
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2021-12-15 12:39:23 -0800
committerShuah Khan <skhan@linuxfoundation.org>2021-12-15 16:44:49 -0700
commit85310a62ca4e415980e30d9d07f904444197cfc4 (patch)
tree598facbe3690a382a7e7a5d0a7d98c0a29b5d000 /drivers/gpu/drm/amd/display/dc/inc/resource.h
parent1ee2ba89bea86d6389509e426583b49ac19b86f2 (diff)
kunit: tool: fix newly introduced typechecker errors
After upgrading mypy and pytype from pip, we see 2 new errors when running ./tools/testing/kunit/run_checks.py. Error #1: mypy and pytype They now deduce that importlib.util.spec_from_file_location() can return None and note that we're not checking for this. We validate that the arch is valid (i.e. the file exists) beforehand. Add in an `asssert spec is not None` to appease the checkers. Error #2: pytype bug https://github.com/google/pytype/issues/1057 It doesn't like `from datetime import datetime`, specifically that a type shares a name with a module. We can workaround this by either * renaming the import or just using `import datetime` * passing the new `--fix-module-collisions` flag to pytype. We pick the first option for now because * the flag is quite new, only in the 2021.11.29 release. * I'd prefer if people can just run `pytype <file>` Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/resource.h')
0 files changed, 0 insertions, 0 deletions