Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Improve line breaks #5

Open
mglukhovsky opened this issue Jul 7, 2014 · 0 comments
Open

Improve line breaks #5

mglukhovsky opened this issue Jul 7, 2014 · 0 comments
Assignees

Comments

@mglukhovsky
Copy link
Member

Improve line breaks to follow PEP8 for readability and to improve viewing on narrow screen widths on the website (see http://rethinkdb.com/docs/examples/flask-backbone-todo/).

@chipotle suggests, for example:

Maybe we should treat cases like that as the exception rather than the
rule. We can either add an override class for that code, or -- given that
it's code -- put in actual carriage returns so the lines aren't longer than
78 characters or so to start with. I think the PEP8 style for the snippet
above, for instance, should really be something like:

def patch_todo(todo_id):
    return jsonify(r.table('todos').get(todo_id).update(request.json)
                   .run(g.rdb_conn))

or possibly

def patch_todo(todo_id):
    return jsonify(
        r.table('todos').get(todo_id).update(request.json) .run(g.rdb_conn))

but, the point is we should probably be explicitly setting the line breaks
in code samples.

chipotle pushed a commit that referenced this issue Jul 7, 2014
Closes issue #5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants