Merge pull request #4572 from DailyDreaming/linting

This commit is contained in:
David Lord 2022-05-02 10:29:38 -06:00 committed by GitHub
commit a0aa8de6bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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):