edaniszewski/pylint-quotes

Improperly flags invalid-string-quote when embedding quotes in string

marcoceppi opened this issue · 3 comments

When producing a string like:

var = "'quoted text' should be 'singled'"

I get the follwoing

Invalid string quote ", should be ' (invalid-string-quote)

Error

@marcoceppi What configuration were you running with? This sounds right to me as a default behavior where the checker is strict. You could try configuring with single-quote=single-avoid-escape which should loosen the constraints when there are embedded quotes. I think that may fix this error

That seems to help, thanks!

I'll update docs to make this more clear -- thanks for opening the issue (: