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

View file

@ -9,6 +9,8 @@ from functools import update_wrapper
from operator import attrgetter from operator import attrgetter
from threading import Lock from threading import Lock
from threading import Thread from threading import Thread
from typing import Any
from typing import TYPE_CHECKING
import click import click
from werkzeug.utils import import_string from werkzeug.utils import import_string
@ -36,7 +38,12 @@ else:
# We technically have importlib.metadata on 3.8+, # We technically have importlib.metadata on 3.8+,
# but the API changed in 3.10, so use the backport # but the API changed in 3.10, so use the backport
# for consistency. # 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): class NoAppException(click.UsageError):