quantopian/zipline — pull request #344 by ehebert (2014-06-03 16:44:44+00:00)
Title: Enforce sentence end double space

__DO NOT MERGE, FOR DISCUSSION ONLY__

@twiecki @ssanderson this is a proposal to help standardize formatting via a .dir-locals.el file for Emacs.
Granted, everyone doesn't use Emacs, but the three of us do, and can add similar files for other editors as warranted.

This was inspired by some collision of docstrings between some of my comments and @ssanderson because he was using `fill-paragraph` on the docstrings, which is a good thing to do. The collision was caused by my global setting of `sentence-end-double-space` to `nil`, but we should probably use the default of using double space. So using the .dir-locals.el file to make it explicit.

An open question is what format to use for docstrings, I included a patch to show some docstrings converted to match the PEP-257 value as seen below, since it is the default.
But I am open to other formats, I tend to write in the Django style just by happenstance, but http://legacy.python.org/dev/peps/pep-0257/#handling-docstring-indentation makes a compelling case.

```
DJANGO:

"""
Process foo, return bar.
"""

"""
Process foo, return bar.

If processing fails throw ProcessingError.
"""

ONETWO:

"""Process foo, return bar."""

"""
Process foo, return bar.

If processing fails throw ProcessingError.

"""

PEP-257:

"""Process foo, return bar."""

"""Process foo, return bar.

If processing fails throw ProcessingError.

"""

PEP-257-NN:

"""Process foo, return bar."""

"""Process foo, return bar.

If processing fails throw ProcessingError.
"""

SYMMETRIC:

"""Process foo, return bar."""

"""
Process foo, return bar.

If processing fails throw ProcessingError.
"""
```