|
|
## pylint config
|
|
|
|
|
|
We use [pylint](https://pylint.readthedocs.io/en/latest/), a standard tool to check code quality in Python.
|
|
|
|
|
|
We adopt the [standard configuration proposed by the Python extension Visual Studio Code](https://code.visualstudio.com/docs/python/linting#_default-pylint-rules) and enrich it with some custom [pylint features](https://pylint.readthedocs.io/en/latest/technical_reference/features.html) like `unused-import`.
|
|
|
|
|
|
The same `pylintrc` is shared by all the developers.
|
|
|
|
|
|
First, download [pylintrc](/uploads/d79c288785480a2fe375c5bd63651c11/pylintrc) and save it in your working directory specific to DBnomics (like `~/Dev/dbnomics`)
|
|
|
|
|
|
For each project (fetcher, API, data-model, etc.), configure your editor to call pylint with the following option: `--rcfile ~/Dev/dbnomics/pylintrc`. For example, in Visual Studio Code, the configuration is done by adding the following key to `.vscode/settings.json`:
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"python.linting.pylintArgs": [
|
|
|
"--rcfile", "~/Dev/dbnomics/pylintrc"
|
|
|
]
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |