Skip to content

sync typeshed #1690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions mypy/test/data/python2eval.test
Original file line number Diff line number Diff line change
Expand Up @@ -399,25 +399,25 @@ print b.x + 1
[case testReModuleBytesPython2]
# Regression tests for various overloads in the re module -- bytes version
import re
bre = b'a+'
bpat = re.compile(bre)
bpat = re.compile(bpat)
re.search(bre, b'').groups()
re.search(bre, u'') # This ought to be an error, but isn't because of bytes->unicode equivalence
re.search(bpat, b'').groups()
re.search(bpat, u'') # Error
# match(), split(), findall(), finditer() are much the same, so skip those.
# sub(), subn() have more overloads and we are checking these:
re.sub(bre, b'', b'') + b''
re.sub(bpat, b'', b'') + b''
re.sub(bre, lambda m: b'', b'') + b''
re.sub(bpat, lambda m: b'', b'') + b''
re.subn(bre, b'', b'')[0] + b''
re.subn(bpat, b'', b'')[0] + b''
re.subn(bre, lambda m: b'', b'')[0] + b''
re.subn(bpat, lambda m: b'', b'')[0] + b''
[out]
_program.py:9: error: Cannot infer type argument 1 of "search"
if False:
bre = b'a+'
bpat = re.compile(bre)
bpat = re.compile(bpat)
re.search(bre, b'').groups()
re.search(bre, u'')
re.search(bpat, b'').groups()
re.search(bpat, u'')
# match(), split(), findall(), finditer() are much the same, so skip those.
# sub(), subn() have more overloads and we are checking these:
re.sub(bre, b'', b'') + b''
re.sub(bpat, b'', b'') + b''
re.sub(bre, lambda m: b'', b'') + b''
re.sub(bpat, lambda m: b'', b'') + b''
re.subn(bre, b'', b'')[0] + b''
re.subn(bpat, b'', b'')[0] + b''
re.subn(bre, lambda m: b'', b'')[0] + b''
re.subn(bpat, lambda m: b'', b'')[0] + b''
[out]

[case testReModuleStringPython2]
# Regression tests for various overloads in the re module -- string version
Expand Down
2 changes: 1 addition & 1 deletion typeshed
Submodule typeshed updated 44 files
+1 −0 .gitignore
+1 −0 stdlib/2.7/SocketServer.pyi
+2 −2 stdlib/2.7/__builtin__.pyi
+2 −2 stdlib/2.7/collections.pyi
+1 −1 stdlib/2.7/datetime.pyi
+1 −1 stdlib/2.7/gettext.pyi
+0 −239 stdlib/2.7/logging/__init__.pyi
+0 −202 stdlib/2.7/logging/handlers.pyi
+19 −19 stdlib/2.7/re.pyi
+2 −2 stdlib/2.7/socket.pyi
+163 −168 stdlib/2.7/ssl.pyi
+5 −1 stdlib/2.7/sys.pyi
+3 −3 stdlib/2.7/typing.pyi
+4 −0 stdlib/2.7/urllib2.pyi
+1 −1 stdlib/2.7/xml/etree/ElementTree.pyi
+355 −0 stdlib/2and3/logging/__init__.pyi
+29 −0 stdlib/2and3/logging/config.pyi
+223 −0 stdlib/2and3/logging/handlers.pyi
+1 −1 stdlib/3.2/xml/etree/ElementTree.pyi
+1 −1 stdlib/3.3/xml/etree/ElementTree.pyi
+1 −1 stdlib/3.4/xml/etree/ElementTree.pyi
+1 −1 stdlib/3.5/xml/etree/ElementTree.pyi
+2 −2 stdlib/3/configparser.pyi
+1 −1 stdlib/3/datetime.pyi
+6 −1 stdlib/3/heapq.pyi
+189 −77 stdlib/3/http/client.pyi
+103 −110 stdlib/3/http/cookiejar.pyi
+24 −39 stdlib/3/http/cookies.pyi
+63 −0 stdlib/3/http/server.pyi
+0 −239 stdlib/3/logging/__init__.pyi
+0 −200 stdlib/3/logging/handlers.pyi
+31 −5 stdlib/3/multiprocessing/__init__.pyi
+1 −1 stdlib/3/queue.pyi
+3 −3 stdlib/3/re.pyi
+9 −4 stdlib/3/socketserver.pyi
+4 −1 stdlib/3/sys.pyi
+11 −10 stdlib/3/types.pyi
+1 −1 stdlib/3/typing.pyi
+1 −1 stdlib/3/xml/etree/ElementTree.pyi
+2 −0 third_party/2.7/six/moves/__init__.pyi
+5 −0 third_party/2.7/sqlalchemy/engine/__init__.pyi
+18 −0 third_party/2.7/sqlalchemy/engine/base.pyi
+7 −1 third_party/2.7/sqlalchemy/sql/schema.pyi
+1 −0 third_party/3/six/moves/__init__.pyi