Qgenerator
Qgenerator

Reputation: 323

How do I stop PyCharm from showing PEP8 mix indent errors when I use triple quoted strings where indenting should be ignored

VAR = '''
  indentation
here
   should
 be 
ignored because it's a string
'''

In actuality, PyCharm/PEP8 complains about it.

Upvotes: 3

Views: 3755

Answers (1)

TheMethod
TheMethod

Reputation: 3001

So using Pycharm 5.0 community edition I was getting this "mixed indentation" warning.. even though the indentation was not mixed.... not sure what is going on there. I didn't want to disable Pep8 checking completely since I think it's useful to help keep my code clean. You can tell Pycharm to ignore this specific error by going to Settings->Editor->Inspection selecting "Pep8 Coding Style Violation". In the bottom right you should see a "ignore errors" box, add the Pep8 error code for this error(E101) and you shouldn't see this error anymore.

Upvotes: 4

Related Questions