Code style for Sugar Python development

March 28, 2018 ยท View on GitHub

General

  • Avoid lines longer than 79 characters.

Python

  • Make your code conform to pep8 and pyflakes

  • Use four spaces for indentation.

Libraries

  • New code should be written in Python 3, using GTK+ 3, GStreamer 1.0, etc

  • Use json, ...

  • Use sugargame when interfacing to pygames

Conventions

  • Methods documentation should be "attached" to the methods (See http://www.python.org/dev/peps/pep-0257)

Contents

  1. 1General
  2. 2Python
  3. 3Libraries
  4. 4Conventions