diff --git a/builtins/2.7/__builtin__.pyi b/builtins/2.7/__builtin__.pyi index b558a03bb..d57c2fe34 100644 --- a/builtins/2.7/__builtin__.pyi +++ b/builtins/2.7/__builtin__.pyi @@ -24,7 +24,7 @@ classmethod = object() # Special, only valid as a decorator. property = object() class object: - __doc__ = '' + __doc__ = ... # type: str __class__ = ... # type: type def __init__(self) -> None: ... @@ -35,8 +35,8 @@ class object: def __hash__(self) -> int: ... class type: - __name__ = '' - __module__ = '' + __name__ = ... # type: str + __module__ = ... # type: str __dict__ = ... # type: Dict[unicode, Any] @overload @@ -461,8 +461,8 @@ class tuple(Sequence[_T_co], Generic[_T_co]): class function: # TODO name of the class (corresponds to Python 'function' class) - __name__ = '' - __module__ = '' + __name__ = ... # type: str + __module__ = ... # type: str class list(MutableSequence[_T], Reversible[_T], Generic[_T]): @overload @@ -594,8 +594,8 @@ class xrange(Sized, Iterable[int], Reversible[int]): def __reversed__(self) -> Iterator[int]: ... class module: - __name__ = '' - __file__ = '' + __name__ = ... # type: str + __file__ = ... # type: str __dict__ = ... # type: Dict[unicode, Any] True = ... # type: bool @@ -757,8 +757,9 @@ class ArithmeticError(StandardError): ... class BufferError(StandardError): ... class EnvironmentError(StandardError): errno = 0 - strerror = '' - filename = '' # TODO can this be unicode? + strerror = ... # type: str + # TODO can this be unicode? + filename = ... # type: str class LookupError(StandardError): ... class RuntimeError(StandardError): ... class ValueError(StandardError): ... diff --git a/builtins/2.7/sys.pyi b/builtins/2.7/sys.pyi index 40b064b00..04994b25f 100644 --- a/builtins/2.7/sys.pyi +++ b/builtins/2.7/sys.pyi @@ -40,7 +40,7 @@ class _version_info(Tuple[int, int, int, str, int]): major = 0 minor = 0 micro = 0 - releaselevel = '' + releaselevel = ... # type: str serial = 0 _mercurial = ... # type: Tuple[str, str, str] @@ -75,8 +75,8 @@ version = ... # type: str warnoptions = ... # type: object float_info = ... # type: _float_info version_info = ... # type: _version_info -ps1 = '' -ps2 = '' +ps1 = ... # type: str +ps2 = ... # type: str last_type = ... # type: type last_value = ... # type: BaseException last_traceback = ... # type: TracebackType diff --git a/builtins/3/array.pyi b/builtins/3/array.pyi index 2f4778f1c..495ba68c5 100644 --- a/builtins/3/array.pyi +++ b/builtins/3/array.pyi @@ -4,12 +4,12 @@ from typing import Any, Iterable, Tuple, List, Iterator, BinaryIO, overload -typecodes = '' +typecodes = ... # type: str class array: def __init__(self, typecode: str, initializer: Iterable[Any] = None) -> None: - typecode = '' + typecode = ... # type: str itemsize = 0 def append(self, x: Any) -> None: ... diff --git a/builtins/3/builtins.pyi b/builtins/3/builtins.pyi index df5359568..32ea71f2a 100644 --- a/builtins/3/builtins.pyi +++ b/builtins/3/builtins.pyi @@ -26,7 +26,7 @@ classmethod = object() # Only valid as a decorator. property = object() class object: - __doc__ = '' + __doc__ = ... # type: str __class__ = ... # type: type def __init__(self) -> None: ... @@ -37,9 +37,9 @@ class object: def __hash__(self) -> int: ... class type: - __name__ = '' - __qualname__ = '' - __module__ = '' + __name__ = ... # type: str + __qualname__ = ... # type: str + __module__ = ... # type: str __dict__ = ... # type: Dict[str, Any] def __init__(self, o: object) -> None: ... @@ -431,9 +431,9 @@ class tuple(Sequence[_T_co], Generic[_T_co]): class function: # TODO not defined in builtins! - __name__ = '' - __qualname__ = '' - __module__ = '' + __name__ = ... # type: str + __qualname__ = ... # type: str + __module__ = ... # type: str __code__ = ... # type: Any class list(MutableSequence[_T], Reversible[_T], Generic[_T]): @@ -595,8 +595,8 @@ class range(Sequence[int], Reversible[int]): class module: # TODO not defined in builtins! - __name__ = '' - __file__ = '' + __name__ = ... # type: str + __file__ = ... # type: str __dict__ = ... # type: Dict[str, Any] True = ... # type: bool @@ -732,8 +732,9 @@ class Exception(BaseException): ... class ArithmeticError(Exception): ... class EnvironmentError(Exception): errno = 0 - strerror = '' - filename = '' # TODO can this be bytes? + strerror = ... # type: str + # TODO can this be bytes? + filename = ... # type: str class LookupError(Exception): ... class RuntimeError(Exception): ... class ValueError(Exception): ... diff --git a/builtins/3/grp.pyi b/builtins/3/grp.pyi index 2630f5517..ad14951b7 100644 --- a/builtins/3/grp.pyi +++ b/builtins/3/grp.pyi @@ -3,8 +3,8 @@ from typing import List # TODO group database entry object type class struct_group: - gr_name = '' - gr_passwd = '' + gr_name = ... # type: str + gr_passwd = ... # type: str gr_gid = 0 gr_mem = ... # type: List[str] diff --git a/builtins/3/pwd.pyi b/builtins/3/pwd.pyi index 942566269..a5a8171c3 100644 --- a/builtins/3/pwd.pyi +++ b/builtins/3/pwd.pyi @@ -6,13 +6,13 @@ import typing class struct_passwd: # TODO use namedtuple - pw_name = '' - pw_passwd = '' + pw_name = ... # type: str + pw_passwd = ... # type: str pw_uid = 0 pw_gid = 0 - pw_gecos = '' - pw_dir = '' - pw_shell = '' + pw_gecos = ... # type: str + pw_dir = ... # type: str + pw_shell = ... # type: str def getpwuid(uid: int) -> struct_passwd: ... def getpwnam(name: str) -> struct_passwd: ... diff --git a/builtins/3/sys.pyi b/builtins/3/sys.pyi index 93e0791fb..a7e4cfe21 100644 --- a/builtins/3/sys.pyi +++ b/builtins/3/sys.pyi @@ -9,18 +9,18 @@ from typing import ( from types import TracebackType # ----- sys variables ----- -abiflags = '' +abiflags = ... # type: str argv = ... # type: List[str] -byteorder = '' +byteorder = ... # type: str builtin_module_names = ... # type: Sequence[str] # actually a tuple of strings -copyright = '' +copyright = ... # type: str #dllhandle = 0 # Windows only dont_write_bytecode = False __displayhook__ = ... # type: Any # contains the original value of displayhook __excepthook__ = ... # type: Any # contains the original value of excepthook -exec_prefix = '' -executable = '' -float_repr_style = '' +exec_prefix = ... # type: str +executable = ... # type: str +float_repr_style = ... # type: str hexversion = 0 # this is a 32-bit int last_type = ... # type: Any last_value = ... # type: Any @@ -32,10 +32,10 @@ modules = ... # type: Dict[str, Any] path = ... # type: List[str] path_hooks = ... # type: List[Any] # TODO precise type; function, path to finder path_importer_cache = ... # type: Dict[str, Any] # TODO precise type -platform = '' -prefix = '' -ps1 = '' -ps2 = '' +platform = ... # type: str +prefix = ... # type: str +ps1 = ... # type: str +ps2 = ... # type: str stdin = ... # type: TextIO stdout = ... # type: TextIO stderr = ... # type: TextIO @@ -45,7 +45,7 @@ __stderr__ = ... # type: TextIO # deprecated and removed in Python 3.3: subversion = ... # type: Tuple[str, str, str] tracebacklimit = 0 -version = '' +version = ... # type: str api_version = 0 warnoptions = ... # type: Any # Each entry is a tuple of the form (action, message, category, module, @@ -102,7 +102,7 @@ class _version_info(Tuple[int, int, int, str, int]): major = 0 minor = 0 micro = 0 - releaselevel = '' + releaselevel = ... # type: str serial = 0 version_info = ... # type: _version_info diff --git a/stdlib/2.7/os/path.pyi b/stdlib/2.7/os/path.pyi index f77ed8c96..e0a0f978c 100644 --- a/stdlib/2.7/os/path.pyi +++ b/stdlib/2.7/os/path.pyi @@ -9,14 +9,14 @@ from typing import overload, List, Any, Tuple, BinaryIO, TextIO, TypeVar, Callab # ----- os.path variables ----- supports_unicode_filenames = False # aliases (also in os) -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -devnull = '' +curdir = ... # type: str +pardir = ... # type: str +sep = ... # type: str +altsep = ... # type: str +extsep = ... # type: str +pathsep = ... # type: str +defpath = ... # type: str +devnull = ... # type: str # ----- os.path function stubs ----- def abspath(path: AnyStr) -> AnyStr: ... diff --git a/stdlib/2.7/string.pyi b/stdlib/2.7/string.pyi index 5142a881b..25c623676 100644 --- a/stdlib/2.7/string.pyi +++ b/stdlib/2.7/string.pyi @@ -4,18 +4,18 @@ from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable, AnyStr -ascii_letters = '' -ascii_lowercase = '' -ascii_uppercase = '' -digits = '' -hexdigits = '' -letters = '' -lowercase = '' -octdigits = '' -punctuation = '' -printable = '' -uppercase = '' -whitespace = '' +ascii_letters = ... # type: str +ascii_lowercase = ... # type: str +ascii_uppercase = ... # type: str +digits = ... # type: str +hexdigits = ... # type: str +letters = ... # type: str +lowercase = ... # type: str +octdigits = ... # type: str +punctuation = ... # type: str +printable = ... # type: str +uppercase = ... # type: str +whitespace = ... # type: str def capwords(s: AnyStr, sep: AnyStr = None) -> AnyStr: ... # TODO: originally named 'from' @@ -49,7 +49,7 @@ def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = None) -> AnyS class Template(object): # TODO: Unicode support? - template = '' + template = ... # type: str def __init__(self, template: str) -> None: ... def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... diff --git a/stdlib/2.7/subprocess.pyi b/stdlib/2.7/subprocess.pyi index 36f3dc9d0..e8626b9c4 100644 --- a/stdlib/2.7/subprocess.pyi +++ b/stdlib/2.7/subprocess.pyi @@ -26,8 +26,8 @@ STDOUT = ... # type: int class CalledProcessError(Exception): returncode = 0 - cmd = '' - output = '' # May be None + cmd = ... # type: str + output = ... # type: str # May be None def __init__(self, returncode: int, cmd: str, output: str) -> None: ... diff --git a/stdlib/2.7/tempfile.pyi b/stdlib/2.7/tempfile.pyi index f8032ea18..fb43a8801 100644 --- a/stdlib/2.7/tempfile.pyi +++ b/stdlib/2.7/tempfile.pyi @@ -7,8 +7,8 @@ from typing import Tuple, IO # global variables -tempdir = '' -template = '' +tempdir = ... # type: str +template = ... # type: str # TODO text files @@ -26,7 +26,7 @@ def SpooledTemporaryFile( ... class TemporaryDirectory: - name = '' + name = ... # type: str def __init__(self, suffix: str = '', prefix: str = 'tmp', dir: str = None) -> None: ... def cleanup(self) -> None: ... diff --git a/stdlib/2.7/threading.pyi b/stdlib/2.7/threading.pyi index 91089bded..a7eada318 100644 --- a/stdlib/2.7/threading.pyi +++ b/stdlib/2.7/threading.pyi @@ -10,7 +10,7 @@ def currentThread() -> Thread: ... def enumerate() -> List[Thread]: ... class Thread(object): - name = '' + name = ... # type: str ident = 0 daemon = False diff --git a/stdlib/2.7/urlparse.pyi b/stdlib/2.7/urlparse.pyi index 832b955b7..ce447dc5e 100644 --- a/stdlib/2.7/urlparse.pyi +++ b/stdlib/2.7/urlparse.pyi @@ -8,7 +8,7 @@ uses_params = [] # type: List[str] non_hierarchical = [] # type: List[str] uses_query = [] # type: List[str] uses_fragment = [] # type: List[str] -scheme_chars = '' +scheme_chars = ... # type: str MAX_CACHE_SIZE = 0 def clear_cache() -> None: ... diff --git a/stdlib/3.4/asyncio/futures.pyi b/stdlib/3.4/asyncio/futures.pyi index fb21cd682..ad1bd32a9 100644 --- a/stdlib/3.4/asyncio/futures.pyi +++ b/stdlib/3.4/asyncio/futures.pyi @@ -18,7 +18,7 @@ class _TracebackLogger: def __del__(self) -> None: ... class Future(Iterator[_T], Generic[_T]): - _state = '' + _state = ... # type: str _exception = Any #Exception _blocking = False _log_traceback = False diff --git a/stdlib/3.4/enum.pyi b/stdlib/3.4/enum.pyi index 8cd5757b1..dcb3b9c94 100644 --- a/stdlib/3.4/enum.pyi +++ b/stdlib/3.4/enum.pyi @@ -9,7 +9,7 @@ class Enum: def __hash__(self) -> Any: ... def __reduce_ex__(self, proto: Any) -> Any: ... - name = '' + name = ... # type: str value = None # type: Any class IntEnum(int, Enum): ... diff --git a/stdlib/3/getopt.pyi b/stdlib/3/getopt.pyi index 6b37e79b7..169c4e1d5 100644 --- a/stdlib/3/getopt.pyi +++ b/stdlib/3/getopt.pyi @@ -13,7 +13,7 @@ def gnu_getopt(args: List[str], shortopts: str, List[str]]: ... class GetoptError(Exception): - msg = '' - opt = '' + msg = ... # type: str + opt = ... # type: str error = GetoptError diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index b6113bb34..fc00a3540 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -46,15 +46,15 @@ O_DIRECTORY = 0 # Gnu extension if in C library O_NOFOLLOW = 0 # Gnu extension if in C library O_NOATIME = 0 # Gnu extension if in C library -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -linesep = '' -devnull = '' +curdir = ... # type: str +pardir = ... # type: str +sep = ... # type: str +altsep = ... # type: str +extsep = ... # type: str +pathsep = ... # type: str +defpath = ... # type: str +linesep = ... # type: str +devnull = ... # type: str F_OK = 0 R_OK = 0 diff --git a/stdlib/3/os/path.pyi b/stdlib/3/os/path.pyi index cbb86d1d6..3674dc4ca 100644 --- a/stdlib/3/os/path.pyi +++ b/stdlib/3/os/path.pyi @@ -8,14 +8,14 @@ from typing import overload, List, Any, AnyStr, Tuple, BinaryIO, TextIO # ----- os.path variables ----- supports_unicode_filenames = False # aliases (also in os) -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -devnull = '' +curdir = ... # type: str +pardir = ... # type: str +sep = ... # type: str +altsep = ... # type: str +extsep = ... # type: str +pathsep = ... # type: str +defpath = ... # type: str +devnull = ... # type: str # ----- os.path function stubs ----- def abspath(path: AnyStr) -> AnyStr: ... diff --git a/stdlib/3/shlex.pyi b/stdlib/3/shlex.pyi index 431d20a8e..cb9acb8fe 100644 --- a/stdlib/3/shlex.pyi +++ b/stdlib/3/shlex.pyi @@ -11,20 +11,20 @@ def split(s: str, comments: bool = False, def quote(s: str) -> str: ... class shlex: - commenters = '' - wordchars = '' - whitespace = '' - escape = '' - quotes = '' - escapedquotes = '' - whitespace_split = '' - infile = '' + commenters = ... # type: str + wordchars = ... # type: str + whitespace = ... # type: str + escape = ... # type: str + quotes = ... # type: str + escapedquotes = ... # type: str + whitespace_split = ... # type: str + infile = ... # type: str instream = ... # type: TextIO - source = '' + source = ... # type: str debug = 0 lineno = 0 - token = '' - eof = '' + token = ... # type: str + eof = ... # type: str def __init__(self, instream=None, infile=None, posix: bool = False) -> None: ... diff --git a/stdlib/3/string.pyi b/stdlib/3/string.pyi index 4ce4b33d8..716eb7abf 100644 --- a/stdlib/3/string.pyi +++ b/stdlib/3/string.pyi @@ -4,20 +4,20 @@ from typing import Mapping -ascii_letters = '' -ascii_lowercase = '' -ascii_uppercase = '' -digits = '' -hexdigits = '' -octdigits = '' -punctuation = '' -printable = '' -whitespace = '' +ascii_letters = ... # type: str +ascii_lowercase = ... # type: str +ascii_uppercase = ... # type: str +digits = ... # type: str +hexdigits = ... # type: str +octdigits = ... # type: str +punctuation = ... # type: str +printable = ... # type: str +whitespace = ... # type: str def capwords(s: str, sep: str = None) -> str: ... class Template: - template = '' + template = ... # type: str def __init__(self, template: str) -> None: ... def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... diff --git a/stdlib/3/subprocess.pyi b/stdlib/3/subprocess.pyi index 142940419..57c4a3bf4 100644 --- a/stdlib/3/subprocess.pyi +++ b/stdlib/3/subprocess.pyi @@ -26,7 +26,7 @@ STDOUT = ... # type: Any class CalledProcessError(Exception): returncode = 0 - cmd = '' + cmd = ... # type: str output = b'' # May be None def __init__(self, returncode: int, cmd: str, output: str) -> None: ... diff --git a/stdlib/3/tarfile.pyi b/stdlib/3/tarfile.pyi index 519075b07..b7bb0ee9c 100644 --- a/stdlib/3/tarfile.pyi +++ b/stdlib/3/tarfile.pyi @@ -5,7 +5,7 @@ from typing import Any, List, overload, Callable class TarError(Exception): ... class TarInfo: - name = '' + name = ... # type: str size = 0 uid = 0 gid = 0 diff --git a/stdlib/3/tempfile.pyi b/stdlib/3/tempfile.pyi index 1b3a123b5..261fd4b37 100644 --- a/stdlib/3/tempfile.pyi +++ b/stdlib/3/tempfile.pyi @@ -6,8 +6,8 @@ from typing import Tuple, BinaryIO # global variables -tempdir = '' -template = '' +tempdir = ... # type: str +template = ... # type: str # TODO text files @@ -29,7 +29,7 @@ def SpooledTemporaryFile( ... class TemporaryDirectory: - name = '' + name = ... # type: str def __init__(self, suffix: str = '', prefix: str = 'tmp', dir: str = None) -> None: ... def cleanup(self) -> None: ... diff --git a/stdlib/3/threading.pyi b/stdlib/3/threading.pyi index c3d86729c..e52c2b5fc 100644 --- a/stdlib/3/threading.pyi +++ b/stdlib/3/threading.pyi @@ -5,7 +5,7 @@ from typing import Any, Dict, Optional, Callable, TypeVar, Union class Thread: - name = '' + name = ... # type: str ident = 0 daemon = False diff --git a/stdlib/3/unittest.pyi b/stdlib/3/unittest.pyi index eb4a50e63..5e2ad90c6 100644 --- a/stdlib/3/unittest.pyi +++ b/stdlib/3/unittest.pyi @@ -45,7 +45,7 @@ class TestResult: class _AssertRaisesBaseContext: expected = ... # type: Any failureException = ... # type: type - obj_name = '' + obj_name = ... # type: str expected_regex = ... # type: Pattern[str] class _AssertRaisesContext(_AssertRaisesBaseContext): @@ -55,7 +55,7 @@ class _AssertRaisesContext(_AssertRaisesBaseContext): class _AssertWarnsContext(_AssertRaisesBaseContext): warning = ... # type: Any # TODO precise type - filename = '' + filename = ... # type: str lineno = 0 def __enter__(self) -> _AssertWarnsContext: ... def __exit__(self, exc_type, exc_value, tb) -> bool: ... diff --git a/stdlib/3/zipfile.pyi b/stdlib/3/zipfile.pyi index 9d6a7f4dd..e98759b0c 100644 --- a/stdlib/3/zipfile.pyi +++ b/stdlib/3/zipfile.pyi @@ -8,7 +8,7 @@ ZIP_DEFLATED = 0 def is_zipfile(filename: Union[str, BinaryIO]) -> bool: ... class ZipInfo: - filename = '' + filename = ... # type: str date_time = ... # type: Tuple[int, int, int, int, int, int] compressed_size = 0 file_size = 0 diff --git a/third_party/2.7/concurrent/futures/__init__.pyi b/third_party/2.7/concurrent/futures/__init__.pyi index b6b2f8312..a9faeeeb1 100644 --- a/third_party/2.7/concurrent/futures/__init__.pyi +++ b/third_party/2.7/concurrent/futures/__init__.pyi @@ -28,8 +28,8 @@ class ProcessPoolExecutor(Executor): def wait(fs: Iterable[Future], timeout: float = None, return_when: str = None) -> Tuple[Iterable[Future], Iterable[Future]]: ... -FIRST_COMPLETED = '' -FIRST_EXCEPTION = '' -ALL_COMPLETED = '' +FIRST_COMPLETED = ... # type: str +FIRST_EXCEPTION = ... # type: str +ALL_COMPLETED = ... # type: str def as_completed(fs: Iterable[Future], timeout: float = None) -> Iterator[Future]: ... diff --git a/third_party/2.7/gflags.pyi b/third_party/2.7/gflags.pyi index 5b2262bf8..54d6eb7d4 100644 --- a/third_party/2.7/gflags.pyi +++ b/third_party/2.7/gflags.pyi @@ -67,12 +67,12 @@ class FlagValues: FLAGS = None # type: FlagValues class Flag: - name = '' + name = ... # type: str default = None # type: Any - default_as_str = '' + default_as_str = ... # type: str value = None # type: Any - help = '' - short_name = '' + help = ... # type: str + short_name = ... # type: str boolean = False present = False parser = None # type: ArgumentParser @@ -90,7 +90,7 @@ class Flag: def WriteInfoInXMLFormat(self, outfile: IO[str], module_name: str, is_key: bool = False, indent: str = '') -> None: ... class ArgumentParser(object): - syntactic_help = "" + syntactic_help = ... # type: str # TODO what is this def Parse(self, argument: Any) -> Any: ... def Type(self) -> str: ... @@ -149,9 +149,9 @@ class NumericParser(ArgumentParser): def Convert(self, argument: Any) -> Any: ... class FloatParser(NumericParser): - number_article = '' - number_name = '' - syntactic_help = '' + number_article = ... # type: str + number_name = ... # type: str + syntactic_help = ... # type: str def __init__(self, lower_bound: float = None, upper_bound: float = None) -> None: ... def Convert(self, argument: Any) -> float: ... def Type(self) -> str: ... @@ -160,9 +160,9 @@ def DEFINE_float(name: str, default: float, help: str, lower_bound: float = None upper_bound: float = None, flag_values: FlagValues = ..., **args: Any) -> None: ... class IntegerParser(NumericParser): - number_article = '' - number_name = '' - syntactic_help = '' + number_article = ... # type: str + number_name = ... # type: str + syntactic_help = ... # type: str def __init__(self, lower_bound: int = None, upper_bound: int = None) -> None: ... def Convert(self, argument: Any) -> int: ... def Type(self) -> str: ...