diff options
Diffstat (limited to 'docs/code_style.md')
-rw-r--r-- | docs/code_style.md | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/docs/code_style.md b/docs/code_style.md index f6c825d7d4..190f8ab2de 100644 --- a/docs/code_style.md +++ b/docs/code_style.md @@ -8,16 +8,16 @@ errors in code. The necessary tools are detailed below. +First install them with: + + pip install -e ".[lint,mypy]" + - **black** The Synapse codebase uses [black](https://pypi.org/project/black/) as an opinionated code formatter, ensuring all comitted code is properly formatted. - First install `black` with: - - pip install --upgrade black - Have `black` auto-format your code (it shouldn't change any functionality) with: @@ -28,10 +28,6 @@ The necessary tools are detailed below. `flake8` is a code checking tool. We require code to pass `flake8` before being merged into the codebase. - Install `flake8` with: - - pip install --upgrade flake8 flake8-comprehensions - Check all application and test code with: flake8 synapse tests @@ -41,10 +37,6 @@ The necessary tools are detailed below. `isort` ensures imports are nicely formatted, and can suggest and auto-fix issues such as double-importing. - Install `isort` with: - - pip install --upgrade isort - Auto-fix imports with: isort -rc synapse tests |