flake8: Enable F811 (#4158)

This commit is contained in:
Sebastian Rittau
2020-06-02 23:08:54 +02:00
committed by GitHub
parent 43cf0ec870
commit a913af9523
15 changed files with 19 additions and 20 deletions

View File

@@ -6,7 +6,6 @@ from typing import (
IO,
List,
Optional,
Text,
overload,
Text,
Tuple,

View File

@@ -5,7 +5,6 @@
from .blueprints import Blueprint
from .config import Config, ConfigAttribute
from .ctx import AppContext, RequestContext, _AppCtxGlobals
from .globals import _request_ctx_stack, g, request, session
from .helpers import _PackageBoundObject, find_package, get_debug_flag, get_env, get_flashed_messages, get_load_dotenv, locked_cached_property, url_for
from .logging import create_logger
from .sessions import SecureCookieSessionInterface

View File

@@ -21,7 +21,7 @@ class Markup(text_type):
def unescape(self) -> Text: ...
def striptags(self) -> Text: ...
@classmethod
def escape(cls, s: text_type) -> Markup: ...
def escape(cls, s: text_type) -> Markup: ... # noqa: F811
def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def format(self, *args, **kwargs) -> Markup: ...
@@ -46,7 +46,7 @@ class Markup(text_type):
class EscapeFormatter(string.Formatter):
escape: Callable[[text_type], Markup]
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ...
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ... # noqa: F811
def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...
if sys.version_info >= (3,):

View File

@@ -12,7 +12,7 @@ from typing import overload as overload
from typing import Text as Text
from typing import Type as Type
from typing import TYPE_CHECKING as TYPE_CHECKING
from typing import TypeVar, Any, Mapping, ItemsView, KeysView, Optional, ValuesView, Dict, Type
from typing import TypeVar, Any, Mapping, ItemsView, KeysView, Optional, ValuesView, Dict
_T = TypeVar('_T')
_F = TypeVar('_F', bound=Callable[..., Any])