Style Guide - adaptive-learning/flocs GitHub Wiki

Python

Try to stick with Google Python Style Guide.

Docstring format for functions:

def some_function(foo, bar=None):
    """Short description.

    Detailed description of the function...

    Args:
        foo: Some description.
        bar: Some description.

    Returns:
        What the function returns, ideally with example if it's complicated.

    Raises:
        IOError: When the error occurs.
    """
    pass

Docstring format for classes:

class SomeClass(object):
    """Short class summary.

    Detailed information about the class...

    Attributes:
        foo: Some description.
        bar: Some description.
    """

    def __init__(self, foo=True):
        """Inits SomeClass."""
        self.foo = foo
        self.bar = 0

JavaScript

TBA