Thread Rating:
  • 0 Vote(s) - 0 Average
coding style guide
#1
Does there exist a coding style guide for Kodi AddOns?

e.g.
  • naming of variables
  • style of doc strings
  • ...
Reply
#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
Reply



coding style guide00