diff --git a/backend/.pre-commit-config.yaml b/backend/.pre-commit-config.yaml new file mode 100644 index 00000000..5f02f32e --- /dev/null +++ b/backend/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + language: python diff --git a/backend/pyproject.toml b/backend/pyproject.toml index ca9b44c4..b70f6a71 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -57,3 +57,7 @@ target-version = "py310" [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 + +[tool.black] +line-length = 88 +target-version = ['py310', 'py311'] diff --git a/backend/requirements-dev.txt b/backend/requirements-dev.txt index 40cd4be6..8240495a 100644 --- a/backend/requirements-dev.txt +++ b/backend/requirements-dev.txt @@ -1,2 +1,4 @@ -r requirements.txt -ruff \ No newline at end of file +ruff +black +pre-commit \ No newline at end of file