Fix multi-part module import errors (#4395)

* Pyright detects and reports cases where a multi-part module name is accessed but is not explicitly imported. These are dangerous because they rely on import resolution ordering within a program, which can easily change. This change eliminates errors detected by pyright.

* Fixed regression caught by CI test.

* Fixed black formatting issues.

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2020-08-06 00:03:54 -07:00
committed by GitHub
parent 04c74640f0
commit 65450d81ff

View File

@@ -1,4 +1,4 @@
import email
import email.message
from _typeshed import AnyPath
from types import TracebackType
from typing import (