Fix annotations with literal values (#3411)

This commit is contained in:
Sebastian Rittau
2019-10-28 14:59:28 +01:00
committed by Jelle Zijlstra
parent 6a7c2011cc
commit 87d7dd3d95
15 changed files with 104 additions and 104 deletions

View File

@@ -6,9 +6,9 @@ _DataType = Union[str, unicode, bytearray, buffer, memoryview]
class _hash(object): # This is not actually in the module namespace.
name: str
block_size = 0
digest_size = 0
digestsize = 0
block_size: int
digest_size: int
digestsize: int
def __init__(self, arg: _DataType = ...) -> None: ...
def update(self, arg: _DataType) -> None: ...
def digest(self) -> str: ...

View File

@@ -2,5 +2,5 @@
from hashlib import md5 as md5, md5 as new
blocksize = 0
digest_size = 0
blocksize: int
digest_size: int

View File

@@ -10,21 +10,21 @@ from typing import (
)
# ----- re variables and constants -----
DEBUG = 0
I = 0
IGNORECASE = 0
L = 0
LOCALE = 0
M = 0
MULTILINE = 0
S = 0
DOTALL = 0
X = 0
VERBOSE = 0
U = 0
UNICODE = 0
T = 0
TEMPLATE = 0
DEBUG: int
I: int
IGNORECASE: int
L: int
LOCALE: int
M: int
MULTILINE: int
S: int
DOTALL: int
X: int
VERBOSE: int
U: int
UNICODE: int
T: int
TEMPLATE: int
class error(Exception): ...

View File

@@ -7,5 +7,5 @@ class sha(object):
def copy(self) -> sha: ...
def new(string: str = ...) -> sha: ...
blocksize = 0
digest_size = 0
blocksize: int
digest_size: int

View File

@@ -9,51 +9,51 @@ def S_ISSOCK(mode: int) -> bool: ...
def S_IMODE(mode: int) -> int: ...
def S_IFMT(mode: int) -> int: ...
ST_MODE = 0
ST_INO = 0
ST_DEV = 0
ST_NLINK = 0
ST_UID = 0
ST_GID = 0
ST_SIZE = 0
ST_ATIME = 0
ST_MTIME = 0
ST_CTIME = 0
S_IFSOCK = 0
S_IFLNK = 0
S_IFREG = 0
S_IFBLK = 0
S_IFDIR = 0
S_IFCHR = 0
S_IFIFO = 0
S_ISUID = 0
S_ISGID = 0
S_ISVTX = 0
S_IRWXU = 0
S_IRUSR = 0
S_IWUSR = 0
S_IXUSR = 0
S_IRWXG = 0
S_IRGRP = 0
S_IWGRP = 0
S_IXGRP = 0
S_IRWXO = 0
S_IROTH = 0
S_IWOTH = 0
S_IXOTH = 0
S_ENFMT = 0
S_IREAD = 0
S_IWRITE = 0
S_IEXEC = 0
UF_NODUMP = 0
UF_IMMUTABLE = 0
UF_APPEND = 0
UF_OPAQUE = 0
UF_NOUNLINK = 0
UF_COMPRESSED = 0
UF_HIDDEN = 0
SF_ARCHIVED = 0
SF_IMMUTABLE = 0
SF_APPEND = 0
SF_NOUNLINK = 0
SF_SNAPSHOT = 0
ST_MODE: int
ST_INO: int
ST_DEV: int
ST_NLINK: int
ST_UID: int
ST_GID: int
ST_SIZE: int
ST_ATIME: int
ST_MTIME: int
ST_CTIME: int
S_IFSOCK: int
S_IFLNK: int
S_IFREG: int
S_IFBLK: int
S_IFDIR: int
S_IFCHR: int
S_IFIFO: int
S_ISUID: int
S_ISGID: int
S_ISVTX: int
S_IRWXU: int
S_IRUSR: int
S_IWUSR: int
S_IXUSR: int
S_IRWXG: int
S_IRGRP: int
S_IWGRP: int
S_IXGRP: int
S_IRWXO: int
S_IROTH: int
S_IWOTH: int
S_IXOTH: int
S_ENFMT: int
S_IREAD: int
S_IWRITE: int
S_IEXEC: int
UF_NODUMP: int
UF_IMMUTABLE: int
UF_APPEND: int
UF_OPAQUE: int
UF_NOUNLINK: int
UF_COMPRESSED: int
UF_HIDDEN: int
SF_ARCHIVED: int
SF_IMMUTABLE: int
SF_APPEND: int
SF_NOUNLINK: int
SF_SNAPSHOT: int

View File

@@ -61,7 +61,7 @@ PIPE: int
STDOUT: int
class CalledProcessError(Exception):
returncode = 0
returncode: int
# morally: _CMD
cmd: Any
# morally: Optional[bytes]
@@ -79,8 +79,8 @@ class Popen(Generic[_T]):
stdin: Optional[IO[bytes]]
stdout: Optional[IO[bytes]]
stderr: Optional[IO[bytes]]
pid = 0
returncode = 0
pid: int
returncode: int
def __new__(cls,
args: _CMD,

View File

@@ -42,11 +42,11 @@ class _float_info:
rounds: int
class _version_info(Tuple[int, int, int, str, int]):
major = 0
minor = 0
micro = 0
major: int
minor: int
micro: int
releaselevel: str
serial = 0
serial: int
_mercurial: Tuple[str, str, str]
api_version: int

View File

@@ -11,7 +11,7 @@ non_hierarchical: List[str]
uses_query: List[str]
uses_fragment: List[str]
scheme_chars: str
MAX_CACHE_SIZE = 0
MAX_CACHE_SIZE: int
def clear_cache() -> None: ...