Coding Standards
The Pyblish codebase has a very strict and consistent coding style. If you are to develop for Pyblish, it's a good idea to stick with it!
- Commit messages should be written in imperative mood; e.g. "change xyz". Not "changes xyz" or "changed xyz".
- A vast majority of these rules conform with PEP8 and as such it is recommended that you familiarise yourself with it.
- For docstrings, you must follow the Google Napoleon convention.
- For code complexity and health, you are advised to adhere to pylint and pyflakes; both of which are probably available as linters to your IDE.
- Don't include
__author__
in source code; commit history is used to keep track of who did what. - An API is exposed either directly in
__init__.py
, or as a separate module calledapi.py
. Prefer__init__.py
unless you have reason not to. Don't forget that you must never remove anything from an API, so it's helpful to try and keep it as small as possible. - Prefer relative imports, but don't get hung up about it if it slows you down.
This list will continue to grow and get more specific, watch this space.