diff --git a/develop/code_style.html b/develop/code_style.html index 0620f138e3..b63f45d140 100644 --- a/develop/code_style.html +++ b/develop/code_style.html @@ -151,49 +151,30 @@
The Synapse codebase uses a number of code formatting tools in order to quickly and automatically check for formatting (and sometimes logical) errors in code.
-The necessary tools are detailed below.
-First install them with:
+The necessary tools are:
+Install them with:
pip install -e ".[lint,mypy]"
-black
-The Synapse codebase uses black -as an opinionated code formatter, ensuring all comitted code is -properly formatted.
-Have black
auto-format your code (it shouldn't change any
-functionality) with:
black .
+The easiest way to run the lints is to invoke the linter script as follows.
+scripts-dev/lint.sh
-
flake8
-flake8
is a code checking tool. We require code to pass flake8
-before being merged into the codebase.
Check all application and test code with:
-flake8 .
-
-isort
-isort
ensures imports are nicely formatted, and can suggest and
-auto-fix issues such as double-importing.
Auto-fix imports with:
-isort .
-
-It's worth noting that modern IDEs and text editors can run these tools
automatically on save. It may be worth looking into whether this
functionality is supported in your editor for a more convenient
-development workflow. It is not, however, recommended to run flake8
on
-save as it takes a while and is very resource intensive.
flake8
or mypy
+on save as they take a while and can be very resource intensive.
CamelCase
for class and type namesfunction_names
and variable_names
.The Synapse codebase uses a number of code formatting tools in order to quickly and automatically check for formatting (and sometimes logical) errors in code.
-The necessary tools are detailed below.
-First install them with:
+The necessary tools are:
+Install them with:
pip install -e ".[lint,mypy]"
-black
-The Synapse codebase uses black -as an opinionated code formatter, ensuring all comitted code is -properly formatted.
-Have black
auto-format your code (it shouldn't change any
-functionality) with:
black .
+The easiest way to run the lints is to invoke the linter script as follows.
+scripts-dev/lint.sh
-
flake8
-flake8
is a code checking tool. We require code to pass flake8
-before being merged into the codebase.
Check all application and test code with:
-flake8 .
-
-isort
-isort
ensures imports are nicely formatted, and can suggest and
-auto-fix issues such as double-importing.
Auto-fix imports with:
-isort .
-
-It's worth noting that modern IDEs and text editors can run these tools
automatically on save. It may be worth looking into whether this
functionality is supported in your editor for a more convenient
-development workflow. It is not, however, recommended to run flake8
on
-save as it takes a while and is very resource intensive.
flake8
or mypy
+on save as they take a while and can be very resource intensive.
CamelCase
for class and type namesfunction_names
and variable_names
.