StyleGuide

Introduction

In general we follow PEP8.

Use flake8 for file validation before committing.

Functions

For functions with more than a couple of arguments use one argument per line.

print(
    blah,
    blip,
    blap,
    blech,
)

This makes it easier to add/remove items from the argument list as needed.

For complicated function calls line up each piece.

print(
    "my name is {}".format(
        "slim shady"
    )
)

Conditionals

For conditionals that need to be on multiple lines use parentheses and align the trailing parenthesis with the start of the conditional.

if (
    name == "blah" or
    age == 30 or
    size == "large"
):
    print("match")
else:
    print("no match found")

CI/Dashboard/StyleGuide (last edited 2014-05-02 14:02:57 by cjohnston)