Fix linting error.

Suppress mypy.

Suppress mypy error.

Suppress mypy error.
This commit is contained in:
DailyDreaming 2022-05-02 07:46:09 -07:00
parent 50374e3cfe
commit 8ddbad9ccd
1 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,8 @@ from functools import update_wrapper
from operator import attrgetter
from threading import Lock
from threading import Thread
from typing import Any
from typing import TYPE_CHECKING
import click
from werkzeug.utils import import_string
@ -36,7 +38,12 @@ else:
# We technically have importlib.metadata on 3.8+,
# but the API changed in 3.10, so use the backport
# for consistency.
import importlib_metadata as metadata # type: ignore
if TYPE_CHECKING:
metadata: Any
else:
# we do this to avoid a version dependent mypy error
# because importlib_metadata is not installed in python3.10+
import importlib_metadata as metadata
class NoAppException(click.UsageError):