From 25bc18661e8362409171fccbf46f4cf35bf05442 Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Mon, 20 Nov 2023 16:57:02 -0700 Subject: [PATCH] precommit lint check --- .flake8 | 2 ++ Developers.md | 21 +++++++++++++++++++++ pyproject.toml | 3 +++ requirements.txt | 4 +++- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .flake8 create mode 100644 Developers.md diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..d148ed3e --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +extend-ignore = E501, W292, W291 \ No newline at end of file diff --git a/Developers.md b/Developers.md new file mode 100644 index 00000000..ca7fda93 --- /dev/null +++ b/Developers.md @@ -0,0 +1,21 @@ +Developers + +Install pre-commit (https://pre-commit.com/) + +```bash +pip install pre-commit +``` + +Check that it's installed + +```bash +pre-commit --versioni +``` + +This repository already has a pre-commit configuration. To install the hooks, run: + +```bash +pre-commit install +``` + +Now when you make a git commit, the black code formatter and ruff linter will run. diff --git a/pyproject.toml b/pyproject.toml index d7fd64b0..cd7a018b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,3 +82,6 @@ ignore = "E501,W6" # or ["E501", "W6"] in-place = true recursive = true aggressive = 3 + +[tool.ruff] +line-length = 200 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index b6a1d69a..2330d399 100644 --- a/requirements.txt +++ b/requirements.txt @@ -73,4 +73,6 @@ rich mkdocs mkdocs-material -mkdocs-glightbox \ No newline at end of file +mkdocs-glightbox + +pre-commit