With the new Python support, we need to agree upon guidelines for Python scripts. At minimum, this means compliance with a style guide.
As Python is a dynamically typed language with few hard rules, style guides are necessary to keep things clean and consistent, reduce merge issues, and make the code more readable.
For simplicity's sake, I suggest we adopt the standard Python style guide–PEP8–with one exception: Make the rule about a max line length of 79 characters optional. In my experience, conforming to this rule can reduce the readability of some scripts.
The full style guide is available here: https://www.python.org/dev/peps/pep-0008/
The primary benefits of using PEP8 over a custom style guide is that it's already wildly adopted, with a number of compliance scripts available, including pep8.py and autopep8.py. Both these scripts can be configured to ignore certain parts of PEP8 via the command line. For example, the 79 character line length rule can be ignored by adding --ignore=E501. A full list of PEP8 error codes is available here.
Another useful tool is flake8, which can enforce PEP8 compliance and identify bad practices and problems that that often lead to bugs and runtime issues, such as variable reuse, unused imports, undefined variable usage, etc. This is very useful as an automated test.
There are also plugins for various IDEs that integrate these scripts to provide visual feedback and shortcuts to autoformat code according to a chosen subset of pep8 rules. A common one is PyDev, which exists as a plugin for Eclipse, but also work in a number of other IDEs.
One of the drawbacks of PEP8 is that some rules will clash with Krita's C++ guidelines. For example, casing of functions: my_function() instead of myFunction().