-
Notifications
You must be signed in to change notification settings - Fork 53
Coding Guidelines
We use PEP8 for everything in the Ainneve codebase.
Some highlights of this:
- Tabs are 4 spaces, and they are SPACES, not TABS
- A blank line at the end of every file (no whitespace on this line)
- 75 characters per line maximum
There are some other pieces that are fairly nitpicky. If you are going to make serious code contributions, just google PEP8.
Sublime Text 3 with Anaconda will automatically give you PEP8 errors as you code. You can follow this tutorial if using ST3: https://realpython.com/blog/python/setting-up-sublime-text-3-for-full-stack-python-development/
Here is my Sublime configuration: { "auto_complete": false, "caret_style": "solid", "color_scheme": "Packages/User/SublimeLinter/Flatland Dark (SL).tmTheme", "draw_white_space": "all", "ensure_newline_at_eof_on_save": true, "file_exclude_patterns": [ ".DS_Store", ".pid", ".pyc" ], "find_selected_text": true, "fold_buttons": false, "folder_exclude_patterns": [ ".git", "pycache", "env", "env3" ], "highlight_line": true, "highlight_modified_tabs": true, "ignored_packages": [ "Vintage" ], "rulers": [ 79 ], "scroll_past_end": false, "show_full_path": true, "show_minimap": false, "sublimelinter": false, "tab_size": 4, "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "wide_caret": true, "word_wrap": true, "wrap_width": 80 }