Python PEP8 syntax warnings



  • Hi all,

    When editing Python files, I would like a WARNING when my Python source code does not conform to the PEP8 code standard.

    For example, when there is whitespace at the end of a line, or when lines are not indented in the right way.

    I would NOT like the source code to be modified automatically, I want to do that myself.

    Does someone know a way to achieve this?

    Regards, Magnus



  • Since it is extremely likely that you are a Python expert, you could write a Notepad++ Pythonscript to check for this conformity. :)



  • This post is deleted!


  • @Scott-Sumner

    Nope, I am not an expert…

    I would like to have all warnings displayed to me rather than look for them one by one.

    I would also prefer using someones work rather than doing it on my own :-)



  • @Magnus-Håkansson said:

    I would also prefer using someones work rather than doing it on my own :-)

    Often desirable, not always achievable!



  • There are PEP8 checkers available (for example). Nothing is currently built in but using something like the PythonScript plugin, NppExec, etc should be possible. With a bit more work you could even highlight the exact locations of each error, etc.



  • For the record, when I read something like the OP’s question, I presume that they have done their due diligence and have explored external options and have a good reason for wanting to do what they are asking about, inside Notepad++. Not always a good presumption, I guess, but this is a N++ forum, after all. :)


Log in to reply