Closed nils-wisiol closed 7 years ago
I found a guideline from google: https://google.github.io/styleguide/pyguide.html There are multiple pyline configurations that configure this styleguide. @Armagetron mentioned that it would be useful to use a Django guideline, but i found only a prosaic specification without a full technical solution: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/
If you wanna go with that, no problem. For us it is sufficient to decide tabs/spaces and stick to unix newlines without a full-blown linter.
Also, PEP has some nice style advice.
Alright so we are using 4 spaces as tab and \n from unix! We will see whether a linter will be needed. Example vim config:
let spaces=4
execute "set tabstop=".spaces
execute "set softtabstop=".spaces
execute "set shiftwidth=".spaces
set expandtab
set smarttab
:+1:
Please use a common policy for coding style, including a policy on tabs vs spaces. Please use
\n
(unix) line breaks everywhere.25 both adds a tab-indented file and changes existing files from tab indention to space indention. Please avoid whitespace-only changes and stick to one of tabs or spaces, preferably the one that is already used in the project.