• Login
Community
  • Login

Python PEP8 syntax warnings

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 7.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Magnus Håkansson
    last edited by Aug 16, 2016, 2:11 PM

    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

    1 Reply Last reply Reply Quote 0
    • S
      Scott Sumner
      last edited by Aug 16, 2016, 2:51 PM

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

      M 1 Reply Last reply Aug 16, 2016, 4:07 PM Reply Quote 0
      • M
        Magnus Håkansson
        last edited by Aug 16, 2016, 3:38 PM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • M
          Magnus Håkansson @Scott Sumner
          last edited by Aug 16, 2016, 4:07 PM

          @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 :-)

          1 Reply Last reply Reply Quote 0
          • S
            Scott Sumner
            last edited by Aug 16, 2016, 6:34 PM

            @Magnus-Håkansson said:

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

            Often desirable, not always achievable!

            1 Reply Last reply Reply Quote 2
            • D
              dail
              last edited by Aug 16, 2016, 6:43 PM

              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.

              1 Reply Last reply Reply Quote 1
              • S
                Scott Sumner
                last edited by Aug 16, 2016, 6:46 PM

                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. :)

                1 Reply Last reply Reply Quote 0
                1 out of 7
                • First post
                  1/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors