summaryrefslogtreecommitdiff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-11-05 12:59:51 +0000
committerChandan Singh <chandan@chandansingh.net>2019-11-14 21:18:52 +0000
commite7d7c1f4b76e112ed7e5d32cf4e053fb69cbc121 (patch)
tree10bd69aeab6cbe67ed302be60043f1d909c85c95 /pyproject.toml
parent10a5b9ffdea2977d01edd28e9a21c3bb0ecb0e12 (diff)
downloadbuildstream-e7d7c1f4b76e112ed7e5d32cf4e053fb69cbc121.tar.gz
Add configuration to run Black
Introduce two new tox environments - `format` and `format-check`. The `format` environment will reformat the code using `black` whereas the `format-check` envrionment will simply print the diff without modifying any files. Configure Black to use the same line lengths that we use currently, i.e. 119.
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml18
1 files changed, 18 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 4dd02d1e5..29f5589b5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,3 +7,21 @@ requires = [
"Cython"
]
build-backend = "setuptools.build_meta"
+
+[tool.black]
+line-length = 119
+exclude = '''
+(
+ /(
+ \.eggs
+ | \.git
+ | \.mypy_cache
+ | \.tox
+ | _build
+ | build
+ | dist
+ )/
+ | src/buildstream/_fuse
+ | src/buildstream/_protos
+)
+'''