Skip to content

Commit

Permalink
Enforce black formatting (#1466)
Browse files Browse the repository at this point in the history
* Enforce black formatting

* Update travis black command
  • Loading branch information
Tiecoon authored and Eric Hennenfent committed Jun 18, 2019
1 parent a0966dc commit 94c2f21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
target-version = ['py36']
line-length = 100

0 comments on commit 94c2f21

Please sign in to comment.