Use TYPE_CHECKING instead of magic MYPY variable. (#8770)

This commit is contained in:
Patrick Cloke 2020-11-17 09:09:40 -05:00 committed by GitHub
parent f737368a26
commit 473dfec1e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View file

@ -15,13 +15,12 @@
# limitations under the License.
import inspect
from typing import Any, Dict, List, Optional, Tuple
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
from synapse.spam_checker_api import RegistrationBehaviour
from synapse.types import Collection
MYPY = False
if MYPY:
if TYPE_CHECKING:
import synapse.events
import synapse.server