From 94c2f21b48c84317658eafdfd9c2a4aa0bb7bb08 Mon Sep 17 00:00:00 2001 From: Luke Biery Date: Tue, 18 Jun 2019 17:57:38 -0400 Subject: [PATCH] Enforce black formatting (#1466) * Enforce black formatting * Update travis black command --- .travis.yml | 2 +- CONTRIBUTING.md | 2 +- pyproject.toml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/.travis.yml b/.travis.yml index 568e00c11..84ddadc12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ jobs: - stage: format env: TEST_TYPE=format script: - - git diff --name-only $TRAVIS_COMMIT_RANGE | python3 scripts/pyfile_exists.py | xargs black -t py36 -l 100 --check + - git diff --name-only $TRAVIS_COMMIT_RANGE | python3 scripts/pyfile_exists.py | xargs black --check - stage: prepare env: TEST_TYPE=env script: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 008532ca2..ed93b78ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ Some pull request guidelines: - We use the [`black`](https://black.readthedocs.io/en/stable/index.html) auto-formatter to enforce style conventions in Manticore. To ensure your code is properly - formatted, run `black -t py36 -l 100 .` in the manticore directory before + formatted, run `black .` in the manticore directory before committing. - Minimize irrelevant changes (formatting, whitespace, etc) to code that would otherwise not be touched by this patch. Save formatting or style corrections diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..0721b0f64 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +target-version = ['py36'] +line-length = 100