4 ms·
pyupgrade 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/a
by ivan_ah 6y ago
pyupgrade 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).