Wemake-python-styleguide: Why double quotes is bad?

Created on 18 Jul 2019  路  3Comments  路  Source: wemake-services/wemake-python-styleguide

> $ cat t.py
hi = "Hello, world!"

And

flake8 t.py
t.py:1:6: Q000 Remove bad quotes

Sorry, I don't understand, why double quotes are bad?
black for format my code use double quotes and then I want to use wemake-python-styleguide.
But why you think double quotes is not good?

question

All 3 comments

And why do think that double quotes are good? 馃檪

The thing is: it is absolutely equally good or bad to use ' or " in your project.
We just have to make a choice here. And use this type of quotes consistency.

Several things here:

  1. You can configure https://github.com/zheller/flake8-quotes the way you like (again, it does not really matter)
  2. You can use black -S to force single quotes with black and flake8-quotes
  3. black is not officially supported: https://wemake-python-styleguide.readthedocs.io/en/latest/pages/usage/integrations.html#auto-formatters Use autoflake8 which is better

Came across this while also trying to answer this question. For what it's worth black actually has some reasons for using double quotes. Find those here!

One more thing! Single quotes are easier to type, because you don't have to press shift.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sobolevn picture sobolevn  路  4Comments

Dreamsorcerer picture Dreamsorcerer  路  3Comments

Dreamsorcerer picture Dreamsorcerer  路  4Comments

orsinium picture orsinium  路  3Comments

sobolevn picture sobolevn  路  4Comments