diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..1c417ba7c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +--- +repos: +- repo: https://github.com/psf/black + # Limits line length to 88, replace single quotes by double quotes, wrap function arguments. + rev: master + hooks: + - id: black + language_version: python + args: [ --config=./pyproject.toml] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..8bb6ee5f5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.black] +line-length = 88 diff --git a/requirements.txt b/requirements.txt index 62ad312f6..3f6637453 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ requests==2.20.0 jsonpickle==0.7.1 cachecontrol==0.11.7 -python-dateutil==2.5.3 \ No newline at end of file +python-dateutil==2.5.3 +pre-commit==2.9.3