- Follow the Python Style Guide (PSG) as formulated in PEP-8: http://www.python.org/dev/peps/pep-0008/
- Use
pylint
to lint code.
The critical points are:
- Use spaces; never use tabs
- 4 space indentation
- 79 character line limit
- Variables, functions and methods should be
lower_case_with_underscores
- Classes are
TitleCase
And other preferences:
- Use ' and not " as the quote character by default
- When writing a method, consider if it is really a method (needs
self
) or if it would be better as a utility function - When writing a
@classmethod
, consider if it really needs the class (needscls
) or it would be better as a utility function or factory class
As a rule, all Python code should be written to support Python 3.7 or greater.
Follow the instructions written in the Wiki page: Setting up your development environment
- Fork this repository.
- Create a breanch from
master
. - Submit your PR using examples.
- Wait until your PR is approved.