PyCQA / modernize

Modernizes Python code for eventual Python 3 migration. Built on top of fissix (a fork of lib2to3)
https://modernize.readthedocs.org/
Other
353 stars 51 forks source link

Add a fixer for instances of `unichr` #145

Closed rowillia closed 7 years ago

rowillia commented 7 years ago

This can be trivially fixed by using the six unichr shim.

takluyver commented 7 years ago

Thanks, this looks good to me. I'll give others a chance to look at it.

rowillia commented 7 years ago

Thanks @takluyver ! @daira What do you think?

brettcannon commented 7 years ago

LGTM as well. @takluyver want me to merge this?

takluyver commented 7 years ago

Actually, just spotted that the naming and one of the tests treat unichr as a type, whereas it's a function. You can't do isinstance(x, chr) on Py3, nor isinstance(x, unichr) on Py2.

rowillia commented 7 years ago

@takluyver Done

brettcannon commented 7 years ago

Tweak LGTM

takluyver commented 7 years ago

Thanks, this looks good to me, but it has merge conflicts now that Brett merged #146.

rowillia commented 7 years ago

@brettcannon @takluyver rebased.

takluyver commented 7 years ago

Thanks