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.
    • Magnus HåkanssonM
      Magnus Håkansson
      last edited by

      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
      • Scott SumnerS
        Scott Sumner
        last edited by

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

        Magnus HåkanssonM 1 Reply Last reply Reply Quote 0
        • Magnus HåkanssonM
          Magnus Håkansson
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Magnus HåkanssonM
            Magnus Håkansson @Scott Sumner
            last edited by

            @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
            • Scott SumnerS
              Scott Sumner
              last edited by

              @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
              • dailD
                dail
                last edited by

                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
                • Scott SumnerS
                  Scott Sumner
                  last edited by

                  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
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors