Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 2.77 KB

code.md

File metadata and controls

72 lines (56 loc) · 2.77 KB

Code - Documentation - Django Event Management

Contents:

Code formatting

pre-commit

Black

  • "The uncompromising code formatter"
  • Website: https://black.readthedocs.io/en/stable/
    • Using Black with other tools: Flake8
      • Set flake8 config: max-line-length = XYZ
      • Set flake8 config: extend-ignore = E203
    • Line length: Flake8
      • Set flake8 config: max-line-length = XYZ
      • Set flake8 config: extend-ignore = E203, E704

Flake8

pycodestyle

  • "Python style guide checker"
  • Website: https://pycodestyle.pycqa.org/en/stable/
    • Error codes (codes starting with E and W)
      • E203 whitespace before ‘,’, ‘;’, or ‘:’
      • E704 multiple statements on one line (def)
      • W503 line break before binary operator

IDEs

Visual Studio Code

{
    // https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
    "[python]": {
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.formatOnSave": true
    },
    "black-formatter.args": [
        "--line-length=120"
    ],
}