- naming of variables
- style of doc strings
Joined: Jul 2017
2017-07-17 13:38 Post: #1
Does there exist a coding style guide for Kodi AddOns?
Joined: Jun 2011
Location: Kyiv, Ukraine
2017-07-17 15:05 Post: #2
Do you mean Python addons? There are no strict rules, but following general Python best practices is strongly recommended.
PEP-8 is the official coding style guide for Python.
As for docstrings, docstring with reStructuredText formatting and Sphinx directives are the de facto standard in Python world. PyCharm IDE can even use Sphinx directives for function/method parameters/returns as type hints for static code analysis (proper type hints have been added only in Python 3.5), highlighting potential issues with type mismatch.
Raspberry PI 2 + LibreELEC 8 (Kodi 17)
Samsung Galaxy Tab A 10.1 + Kodi 17 for Android