fix bugs in builtins/2.7/*.pyi

This commit is contained in:
Matthias Kramm
2015-10-01 08:02:44 -07:00
parent 3f713101a5
commit a2f5703041
22 changed files with 77 additions and 58 deletions

View File

@@ -1,12 +1,13 @@
"""Stubs for the 'unicodedata' module."""
from typing import Any, TypeVar
from typing import Any, TypeVar, Union, Optional
ucd_3_2_0 = ... # type: UCD
ucnhash_CAPI = ... # type: Any (PyCapsule)
unidata_version = ... # type: str
# PyCapsule
ucnhash_CAPI = ... # type: Any
_default = TypeVar("default")
_default = TypeVar("_default")
def bidirectional(unichr: unicode) -> str: ...
def category(unichr: unicode) -> str: ...
@@ -19,7 +20,7 @@ def lookup(name: str): unicode
def mirrored(unichr: unicode): int
def name(chr: unicode, default=_default) -> Union[str, _default]: ...
def normalize(form: str, unistr: unicode) -> unicode: ...
def numeric(chr, default=_default): Union[float, _default]: ...
def numeric(chr, default=_default) -> Union[float, _default]: ...
class UCD(object):
unidata_version = ... # type: str
@@ -36,4 +37,4 @@ class UCD(object):
def mirrored(unichr: unicode): int
def name(chr: unicode, default=_default) -> Union[str, _default]: ...
def normalize(form: str, unistr: unicode) -> unicode: ...
def numeric(chr, default=_default): Union[float, _default]: ...
def numeric(chr, default=_default) -> Union[float, _default]: ...