mirror of
https://github.com/python/cpython.git
synced 2026-01-05 15:02:33 +00:00
Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
This commit is contained in:
parent
f25f788c6c
commit
d4f4a6dddb
3 changed files with 7 additions and 1 deletions
|
|
@ -42,7 +42,7 @@
|
|||
'NotImplementedType' : 'type(NotImplemented)',
|
||||
'SliceType' : 'slice',
|
||||
'StringType': 'bytes', # XXX ?
|
||||
'StringTypes' : 'str', # XXX ?
|
||||
'StringTypes' : '(str,)', # XXX ?
|
||||
'TupleType': 'tuple',
|
||||
'TypeType' : 'type',
|
||||
'UnicodeType': 'str',
|
||||
|
|
|
|||
|
|
@ -3322,6 +3322,10 @@ def test_basic_types_convert(self):
|
|||
a = """type(None)"""
|
||||
self.check(b, a)
|
||||
|
||||
b = "types.StringTypes"
|
||||
a = "(str,)"
|
||||
self.check(b, a)
|
||||
|
||||
class Test_idioms(FixerTestCase):
|
||||
fixer = "idioms"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
|
||||
|
||||
- Issue #8585: improved tests for zipimporter2. Patch from Mark Lawrence.
|
||||
|
||||
- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue