diff --git a/.vscode/settings.json b/.vscode/settings.json index 2127f57..bdd09f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,14 @@ { - "python.formatting.provider": "black", - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": [ - "--max-line-length=88" - ], + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + }, + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, "python.testing.pytestArgs": [ "tests" ], - "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true, + "flake8.args": [ + "--max-line-length=120" + ] } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 065ddde..e5880a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,16 @@ To try this out locally: - `source .venv/bin/activate` to use that virtual environment. - `poetry install` to install project dependencies. -VSCode is recommended for development. You can try [these instructions](https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-1) +VSCode is recommended for development. +- For formatting, the project uses the [Black](https://github.com/psf/black) code formatter, and the +[Black Formatter VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter) +is recommended. +- For linting, the project uses the [Flake8](https://flake8.pycqa.org/en/latest/) linter and the +[Flake8 extension](https://marketplace.visualstudio.com/items?itemName=ms-python.flake8) is recommended. +These tools are included in the project by pyproject.toml and the settings are in .vscode/settings.json. + +You can also get additional information at +[these instructions](https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-1) for getting setup in VSCode with linting and formatting enabled. ## Running the tests