From 18bbd3396c3681c641ac5693e5471abf68cfa84c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 18 May 2019 10:47:39 -0400 Subject: [PATCH] Add .pre-commit-config.yaml See https://pre-commit.com/ for documentation on how to use this file. SQLAlchemy and related projects make use of Black and zimports for code formatting, this hook allows for automated pre-commit runs. Change-Id: I4bbb49747e9f7fb52251dc61ecda98361cd036fd (cherry picked from commit 69ebf2cc365baf82016c9d1672fe89e39594b523) --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 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..f9b217e552 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/python/black/ + rev: 19.3b0 + hooks: + - id: black + args: [-l 79] + +- repo: https://github.com/sqlalchemyorg/zimports/ + rev: master + hooks: + - id: zimports + + -- 2.47.2