Open jeremysalwen opened 7 years ago
Thanks for sending this! I guess there has been an API change, will find a fix shortly. :)
Any updates on this?
The current release version in pypi (0.9.2) hasn't been updated since 2015-04-13, but this issue with yapf was fixed by https://github.com/hayd/pep8radius/pull/82 on 2016-01-20.
If you want to try using the latest source version from github:
pip install --upgrade git+https://github.com/hayd/pep8radius.git
The -y
/--yapf
flag appears to work correctly for me following that upgrade. Beware that there might be other bugs lurking, as the travis-ci builds have been failing after the last several commits to master.
Sorry, I've let this slip by. I thought I'd pushed it out.
To fix the tests, I think need to remove the pep8radius option (at least remove it as the default) and move to just using yapf (or set pep8radius to an older version), pep8radius removed some (all?) of the line-to-line correction.
Also can report this issue on the latest pip
release. Get the following when running with --yapf
Traceback (most recent call last):
File "./virtual_env/bin/pep8radius", line 11, in <module>
sys.exit(_main())
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/site-packages/pep8radius/main.py", line 275, in _main
return sys.exit(main(args=args, vc=vc, cwd=cwd, apply_config=True))
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/site-packages/pep8radius/main.py", line 82, in main
r.fix()
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/site-packages/pep8radius/radius.py", line 95, in fix
p_diff = self.fix_file(file_name)
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/site-packages/pep8radius/radius.py", line 129, in fix_file
verbose=self.verbose, cwd=self.cwd)
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/site-packages/pep8radius/radius.py", line 190, in fix_file
f.write(fixed)
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/codecs.py", line 706, in write
return self.writer.write(data)
File "/Users/jbelotti/Code/zendesk/content_cues/virtual_env/lib/python2.7/codecs.py", line 369, in write
data, consumed = self.encode(object, self.errors)
TypeError: coercing to Unicode: need string or buffer, tuple found
pep8radius 0.9.2