From 7526ab1f3cba53a44871bd77930c901f34fdf1c5 Mon Sep 17 00:00:00 2001 From: Chris Leaman Date: Fri, 8 Feb 2019 16:18:13 +1100 Subject: [PATCH] Add pre-commit hooks to ensure code formatting --- .pre-commit-config.yaml | 8 ++++++++ environment.yml | 1 + 2 files changed, 9 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 0000000..4a30ef2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: +- repo: https://github.com/ambv/black + rev: 18.9b0 + hooks: + - id: black + language_version: python3.6 + language: system + entry: python -m black diff --git a/environment.yml b/environment.yml index d7dfcea..be621bf 100644 --- a/environment.yml +++ b/environment.yml @@ -4,6 +4,7 @@ channels: dependencies: - python=3.6 - attrs + - pre-commit - autopep8 - black - click