zheller / flake8-quotes

Flake8 extension for checking quotes in python
MIT License
178 stars 39 forks source link

Link to tools which automatically fix the quote style? #84

Closed peterjc closed 5 years ago

peterjc commented 5 years ago

Are you aware of any tools to reformat Python files to use a preferred quote style? Something like black or autopep8 or YAPF but able to fix just this one issue?

The only thing I have found so far is unify, which seems worth using in conjunction with your flake8 plugin:

https://github.com/myint/unify

twolfson commented 5 years ago

Sorry, I haven't done a search for an automatic formatter with this setup =/ Maybe try looking for dependent packages or asking on a forum (e.g. Reddit)?

peterjc commented 5 years ago

Thanks. Happily unify as it seems to work nicely (I used it successfully yesterday on a very large and diverse code base).

I would recommend adding a link to unify in the flake8-quotes main README - the flip side of linting tools is fixer tools.

ghost commented 5 years ago

Too bad that autopep8 won't automatically fix quotes according to setup.cfg.

Avasam commented 2 years ago

unify seems to be working for me as a fixer for quotes.