3 ms·
Unless the tool does something more than its tagline, pyupgrade[1] offers the same functionality and much more. [1]: https://github.com/asottile/pyupgrade http
by uranusjr 6y ago
Unless the tool does something more than its tagline, pyupgrade[1] offers the same functionality and much more.
[1]: https://github.com/asottile/pyupgrade https://github.com/asottile/pyupgrade
- ivan_ah 6y agopyupgrade seems to do lots of useful stuff; thx for link! I guess you need the `--py36-plus` CLI option to reproduce the desired behaviour https://github.com/asottile/pyupgrade#f-strings https://github.com/asottile/pyupgrade#f-strings thought that might result in lots of other edits to the source, this in particular seems unwarranted "foo".encode("utf-8") --> "foo".encode() because the default encoding in py3+ is utf-8. What happened to explicit is better than implicit?
- uranusjr 6y agoYeah, I’d say not all rules in pyupgrade are universally popular. Fortunately I seldom see it used as a CI checker or pre-commit hook, and much more often used as a one-off transition tool with output manually reviewed instead (more like 2to3 than black).