docs: update contributing doc

Update the code style guidelines informing contributors that they should validate their code with pycodestyle and mypy before submission.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-05-19 08:19:21 -04:00
parent 7465de389f
commit 94e1dcf2cb
1 changed files with 13 additions and 2 deletions

View File

@ -15,8 +15,19 @@ are near those of Klipper:
#
# This file may be distributed under the terms of the GNU GPLv3 license
- No line in the source code or documentation should exceed 80 characters.
Be sure there is no trailing whitespace.
- No line in the source code should exceed 80 characters. Be sure there is no
trailing whitespace. To validate code before submission one may use `pycodestyle`
with the following options:
- `--ignore=E226,E301,E302,E303,W503,W504`
- `--max-line-length=80`
- `--max-doc-length=80`
- Generally speaking, each line in submitted documentation should also be no
longer than 80 characters, however there are situations where this isn't
possible, such as long hyperlinks or example return values.
- Python code should be fully annotated. Moonraker uses the `mypy` static
type checker for code validation with the following options:
- `--ignore-missing-imports`
- `--follow-imports=silent`
- Each Commit message should be in the following format:
module name: brief description of commit