Added skeletons for io.FileIO, io.TextIOWrapper and several others

This commit is contained in:
Andrey Vlasovskikh
2013-09-11 20:18:22 +04:00
parent d085fdf75e
commit a3b5e67edb
2 changed files with 1 additions and 86 deletions

View File

@@ -1343,91 +1343,6 @@ os.urandom = \
:rtype: bytes \n\
## 15.2. io
io.open = \
:type name: string \n\
:type mode: string \n\
:type buffering: int \n\
:type encoding: string or None \n\
:type errors: string or None \n\
:rtype: file \n\
io.TextIOWrapper.__init__ = \
:rtype: io.TextIOWrapper of T \n\
io.TextIOWrapper.__enter__ = \
:rtype: io.TextIOWrapper of unicode \n\
io.TextIOWrapper.read = \
:rtype: unicode \n\
io.TextIOWrapper.readline = \
:rtype: unicode \n\
io.TextIOWrapper.readlines = \
:rtype: list of unicode \n\
io.TextIOWrapper.__iter__ = \
:rtype: list of unicode \n\
io.TextIOWrapper.write = \
:type s: string \n\
:rtype: int \n\
io.FileIO.__init__ = \
:rtype: io.FileIO of T \n\
io.FileIO.__enter__ = \
:rtype: io.FileIO of bytes \n\
io.FileIO.read = \
:rtype: bytes \n\
io.FileIO.readline = \
:rtype: bytes \n\
io.FileIO.readlines = \
:rtype: list of bytes \n\
io.FileIO.__iter__ = \
:rtype: list of bytes \n\
io.FileIO.write = \
:type b: bytestring \n\
:rtype: int \n\
io.IOBase.__init__ = \
:rtype: io.IOBase of T \n\
io.IOBase.readlines = \
:rtype: list of T \n\
io.IOBase.writelines = \
:type lines: collections.Iterable of T \n\
io.IOBase.__iter__ = \
:rtype: list of T \n\
io.IOBase.next = \
:rtype: T \n\
io._IOBase.__init__ = \
:rtype: io._IOBase of T \n\
io._IOBase.readlines = \
:rtype: list of T \n\
io._IOBase.writelines = \
:type lines: collections.Iterable of T \n\
io._IOBase.__iter__ = \
:rtype: list of T \n\
io._IOBase.next = \
:rtype: T \n\
## 17.1. subprocess
subprocess.Popen.__init__ = \

View File

@@ -2,4 +2,4 @@ with open('foo', 'wb') as fd:
fd.write(b'bar')
with open('foo', 'wb') as fd:
fd.write(<warning descr="Expected type 'bytes', got 'str' instead">'bar'</warning>)
fd.write(<warning descr="Expected type 'bytes | bytearray', got 'str' instead">'bar'</warning>)