Skip to content

Instantly share code, notes, and snippets.

@etianen
Created January 29, 2014 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etianen/8690558 to your computer and use it in GitHub Desktop.
Save etianen/8690558 to your computer and use it in GitHub Desktop.
# Indent container contents on new lines.
some_tuple = (
("foo", "bar"),
("baz", "bat"), # Always add trailing commas.
)
some_dict = {
"foo": "bar",
"baz": "bat",
}
# Long function calls likewise indented.
foo(
"foo",
foo = "bar",
baz = "bat",
)
@blueyed
Copy link

blueyed commented Jan 29, 2014

This is fine with PEP8, but this is a hanging indent:

foo_bar_bar("arg1",
    "arg2",
    "arg3")

The error with this gist:
gistfile1.py:15:8: E251 unexpected spaces around keyword / parameter equals
gistfile1.py:15:10: E251 unexpected spaces around keyword / parameter equals
gistfile1.py:16:8: E251 unexpected spaces around keyword / parameter equals
gistfile1.py:16:10: E251 unexpected spaces around keyword / parameter equals
gistfile1.py:18:1: W391 blank line at end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment