Remove unnecessary quotes around forward references. (#3191)

This commit is contained in:
Rebecca Chen
2019-08-16 20:29:32 -07:00
committed by Jelle Zijlstra
parent b294782183
commit fab2ee0d7c
11 changed files with 12 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ from typing import (
import sys
_T = TypeVar('_T')
_ActionT = TypeVar('_ActionT', bound='Action')
_ActionT = TypeVar('_ActionT', bound=Action)
_N = TypeVar('_N')
if sys.version_info >= (3,):

View File

@@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, Optional, Text, TypeVar, Union
def run(statement: str, filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ...
def runctx(statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ...
_SelfT = TypeVar('_SelfT', bound='Profile')
_SelfT = TypeVar('_SelfT', bound=Profile)
_T = TypeVar('_T')
if sys.version_info >= (3, 6):
_Path = Union[bytes, Text, os.PathLike[Any]]

View File

@@ -61,7 +61,7 @@ if sys.version_info >= (3,):
class ContextDecorator:
def __call__(self, func: Callable[..., None]) -> Callable[..., ContextManager[None]]: ...
_U = TypeVar('_U', bound='ExitStack')
_U = TypeVar('_U', bound=ExitStack)
class ExitStack(ContextManager[ExitStack]):
def __init__(self) -> None: ...
@@ -79,7 +79,7 @@ if sys.version_info >= (3,):
if sys.version_info >= (3, 7):
from typing import Awaitable
_S = TypeVar('_S', bound='AsyncExitStack')
_S = TypeVar('_S', bound=AsyncExitStack)
_ExitCoroFunc = Callable[[Optional[Type[BaseException]],
Optional[BaseException],

View File

@@ -2,7 +2,7 @@ import sys
from abc import abstractmethod
from typing import Any, Optional, TypeVar, Union, Pattern, Text, Tuple
_T = TypeVar('_T', bound='Version')
_T = TypeVar('_T', bound=Version)
class Version:
def __repr__(self) -> str: ...

View File

@@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, Optional, Text, TypeVar, Union
def run(statement: str, filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ...
def runctx(statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ...
_SelfT = TypeVar('_SelfT', bound='Profile')
_SelfT = TypeVar('_SelfT', bound=Profile)
_T = TypeVar('_T')
if sys.version_info >= (3, 6):
_Path = Union[bytes, Text, os.PathLike[Any]]

View File

@@ -5,7 +5,7 @@ import sys
from typing import Any, Dict, IO, Iterable, List, Text, Tuple, TypeVar, Union, overload
_Selector = Union[str, float, int]
_T = TypeVar('_T', bound='Stats')
_T = TypeVar('_T', bound=Stats)
if sys.version_info >= (3, 6):
_Path = Union[bytes, Text, os.PathLike[Any]]
else:

View File

@@ -16,7 +16,7 @@ SEEK_SET: int
SEEK_CUR: int
SEEK_END: int
_T = TypeVar('_T', bound='IOBase')
_T = TypeVar('_T', bound=IOBase)
open = builtins.open

View File

@@ -4,7 +4,7 @@ from typing import (
)
from types import TracebackType
_PT = TypeVar('_PT', bound='Pool')
_PT = TypeVar('_PT', bound=Pool)
_S = TypeVar('_S')
_T = TypeVar('_T')

View File

@@ -3,7 +3,7 @@ from types import TracebackType
import os
import sys
_P = TypeVar('_P', bound='PurePath')
_P = TypeVar('_P', bound=PurePath)
if sys.version_info >= (3, 6):
_PurePathBase = os.PathLike[str]

View File

@@ -3,7 +3,7 @@ from types import TracebackType
import os
import sys
_P = TypeVar('_P', bound='PurePath')
_P = TypeVar('_P', bound=PurePath)
if sys.version_info >= (3, 6):
_PurePathBase = os.PathLike[str]

View File

@@ -5,7 +5,7 @@ from datetime import datetime
_T = TypeVar('_T')
_KT = TypeVar('_KT')
_VT = TypeVar('_VT')
_MT = TypeVar('_MT', bound='MapAttribute')
_MT = TypeVar('_MT', bound=MapAttribute)
class Attribute(Generic[_T]):
attr_name: Optional[Text]