Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.4 KB

CONTRIBUTING.md

File metadata and controls

43 lines (27 loc) · 1.4 KB

Contributing to wampy

Contributions are very welcome!

wampy style conventions

wampy follows the standard PEP8 style guide for Python and the PEP257 for docstrings.

All source code is linted using the default configuration of flake8.

wampy prefers standard guidlines.

For example, wampy loves trailing commas and doesn't really like backslashes.

Imports

Please follow the following convention:

# standard lib, straight `imports` first please
import os
import sys
from itertools import cycle, repeat  # imports should be in alphabetical order

# 3rd party imports
import sqlalchemy
from eventlet.green import urllib2

# wampy imports
from wampy.constants import (
    DEFAULT_ROUTER_URL, DEFAULT_ROLES, DEFAULT_REALM,  # trailing commas are appreciated
)
from wampy.session import Session
from wampy.messages import Abort, Challenge

Line Length

wampy especially enjoys line lengths <= 79 chars and longer lines crafted with appropriate lines breaks.

For example, above, wampy always drops import lines longer than 79 chars on to a new line and never uses backslashes - parenthesis are always preferred.

Please never use backslashes.