Skip to content

Commit f3b1dc4

Browse files
herbgvanrossum
authored andcommitted
sync typeshed (#1690)
1 parent cb1786f commit f3b1dc4

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

mypy/test/data/python2eval.test

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -399,25 +399,25 @@ print b.x + 1
399399
[case testReModuleBytesPython2]
400400
# Regression tests for various overloads in the re module -- bytes version
401401
import re
402-
bre = b'a+'
403-
bpat = re.compile(bre)
404-
bpat = re.compile(bpat)
405-
re.search(bre, b'').groups()
406-
re.search(bre, u'') # This ought to be an error, but isn't because of bytes->unicode equivalence
407-
re.search(bpat, b'').groups()
408-
re.search(bpat, u'') # Error
409-
# match(), split(), findall(), finditer() are much the same, so skip those.
410-
# sub(), subn() have more overloads and we are checking these:
411-
re.sub(bre, b'', b'') + b''
412-
re.sub(bpat, b'', b'') + b''
413-
re.sub(bre, lambda m: b'', b'') + b''
414-
re.sub(bpat, lambda m: b'', b'') + b''
415-
re.subn(bre, b'', b'')[0] + b''
416-
re.subn(bpat, b'', b'')[0] + b''
417-
re.subn(bre, lambda m: b'', b'')[0] + b''
418-
re.subn(bpat, lambda m: b'', b'')[0] + b''
419-
[out]
420-
_program.py:9: error: Cannot infer type argument 1 of "search"
402+
if False:
403+
bre = b'a+'
404+
bpat = re.compile(bre)
405+
bpat = re.compile(bpat)
406+
re.search(bre, b'').groups()
407+
re.search(bre, u'')
408+
re.search(bpat, b'').groups()
409+
re.search(bpat, u'')
410+
# match(), split(), findall(), finditer() are much the same, so skip those.
411+
# sub(), subn() have more overloads and we are checking these:
412+
re.sub(bre, b'', b'') + b''
413+
re.sub(bpat, b'', b'') + b''
414+
re.sub(bre, lambda m: b'', b'') + b''
415+
re.sub(bpat, lambda m: b'', b'') + b''
416+
re.subn(bre, b'', b'')[0] + b''
417+
re.subn(bpat, b'', b'')[0] + b''
418+
re.subn(bre, lambda m: b'', b'')[0] + b''
419+
re.subn(bpat, lambda m: b'', b'')[0] + b''
420+
[out]
421421

422422
[case testReModuleStringPython2]
423423
# Regression tests for various overloads in the re module -- string version

0 commit comments

Comments
 (0)