forked from orbit-oss/flask
Merge pull request #4572 from DailyDreaming/linting
This commit is contained in:
commit
a0aa8de6bc
1 changed files with 8 additions and 1 deletions
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue