wafflesfm / batter

It makes Waffles.
Other
83 stars 18 forks source link

Coding conventions #10

Closed superbobry closed 11 years ago

superbobry commented 11 years ago

Is there any? If not, how about we adopt these:

edgewyn commented 11 years ago

Currently we don't have any enforced coding conventions. These two sound good to me, so consider them adopted!

edgewyn commented 11 years ago

Out of curiosity, do you know if there's any way to automatically check for style compliance?

senturio commented 11 years ago

PR incoming for that.

Also, the two style guides are conflicting. We should probably pick one.

Ell commented 11 years ago

What conflicts between them? the django style guide is only for django stuff while the pocoo guide is for general python code

I use both for the code i write. 2 spaces between functions and such is great

superbobry commented 11 years ago

The only conflict I can see is line length: Pocoo styleguide requires 79-84 chars max (which seems reasonable, from my point of view), while Django styleguide doesn't enforce any limit:

One big exception to PEP 8 is our preference of longer line lengths. We’re well into the 21st Century, and we have > high-resolution computer screens that can fit way more than 79 characters on a screen. Don’t limit lines of code to > 79 characters if it means the code looks significantly uglier or is harder to read.

senturio commented 11 years ago

I've redone everything with 79 characters per line and will commit later tonight along with pep8/code coverage stuff.

superbobry commented 11 years ago

Great!