Transifex Coding Style ====================== Here are some notes on the common style we use for stuff landing in Transifex. * Code follows the guidelines described in the standard Python Coding Style of PEP-8_. Docstrings follow PEP-257_. * Commit messages should have a short first line and optionally more information after a blank newline:: Short (50 chars or less) summary of changes (#ticket) More detailed explanatory text can follow after a blank line, if necessary. Wrap to about 72 characters or so. If there is a ticket associated, include it in the summary line. Prefix line with "bugfix:" and "trivial:" for bugfixes and trivial commits. - Bullet points are okay, too. Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines between items. - Use a hanging indent, like above. Hint: ``:set tw=72``, or in ~/.bashrc: ``export EDITOR="vim -c 'set tw=72'`` * Model filtering should be in the form:: Module.query.filter_by(name='foo') and *not*:: Module.query.filter(Module.name=='foo') .. _PEP-8: http://www.python.org/dev/peps/pep-0008/ .. _PEP-257: http://www.python.org/dev/peps/pep-0257/