From 397a12c6fa4d16a4264e32155e6c33b6d07f30b8 Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:07:55 -0400 Subject: [PATCH] Add pre-commit hook to format python (#1780) * Add pre-commit config to format with black * Add pre-commit as dev-requirement --- .pre-commit-config.yaml | 5 +++++ dev-requirements.txt | 1 + 2 files changed, 6 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..27bdf6e80d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/psf/black + rev: 22.3.0 + hooks: + - id: black-jupyter diff --git a/dev-requirements.txt b/dev-requirements.txt index 1c59c351b9..0d4760525d 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,2 +1,3 @@ GitPython==3.1.17 black[jupyter]==22.6.0 +pre-commit==2.* \ No newline at end of file