Avoid using string literals in type annotations (#2294)

This commit is contained in:
Yusuke Miyazaki
2018-07-03 12:23:29 +09:00
committed by Jelle Zijlstra
parent 25ad95de4f
commit 6192cce9d9
50 changed files with 175 additions and 175 deletions

View File

@@ -4,7 +4,7 @@ from typing import List, Union, Sequence, Optional, Dict
class Class:
module = ... # type: str
name = ... # type: str
super = ... # type: Optional[List[Union["Class", str]]]
super = ... # type: Optional[List[Union[Class, str]]]
methods = ... # type: Dict[str, int]
file = ... # type: int
lineno = ... # type: int
@@ -12,7 +12,7 @@ class Class:
def __init__(self,
module: str,
name: str,
super: Optional[List[Union["Class", str]]],
super: Optional[List[Union[Class, str]]],
file: str,
lineno: int) -> None: ...