PRAW gladly welcomes new contributions. As with most larger projects, we have an established consistent way of doing things. A consistent style increases readability, decreases bug-potential and makes it faster to understand how everything works together.
- Objects are sorted alphabetically.
- Things should maintain the same name throughout the code. **kwargs should never be **kw.
- Things should be stored in the same data structure throughout the code.
- If you’re adding functionality, either add tests or suggest how it might be tested.
- In assertEquals, the first value should be the value you’re testing and the second the known value.
- All publicly available functions, classes and modules should have a docstring.
- Use correct terminology. A subreddits name is something like ‘ t3_xyfc7’. The correct term for a subreddits “name” like python is its display name.
- When referring to any reddit. Refer to it as ‘reddit’. When you are speaking of the specific reddit instance with the website reddit.com, refer to it as ‘reddit.com’. This helps prevent any confusion between what is universally true between all reddits and what specifically applies to the most known instance.