Skip to content
Snippets Groups Projects
Commit decc3bd3f20d authored by Augie Fackler's avatar Augie Fackler
Browse files

black: merge config into main pyproject.toml now that we have it

This means that naive contributors who just run `black` on a source file
will get reasonable behavior as long as they have a recent black. Yay!

This was previously D9834 but was rolled back due to test
failures. nbjoerg thinks it's time to try again, so let's give it a
shot.

Differential Revision: https://phab.mercurial-scm.org/D10185
parent d13afdd1f6e2
No related branches found
No related tags found
No related merge requests found
[tool.black]
line-length = 80
exclude = '''
build/
| wheelhouse/
| dist/
| packages/
| \.hg/
| \.mypy_cache/
| \.venv/
| mercurial/thirdparty/
'''
skip-string-normalization = true
quiet = true
......@@ -5,7 +5,7 @@
rustfmt:command = rustfmt +nightly
rustfmt:pattern = set:"**.rs" - "mercurial/thirdparty/**"
black:command = black --config=black.toml -
black:command = black
black:pattern = set:**.py - mercurial/thirdparty/**
# Mercurial doesn't have any Go code, but if we did this is how we
......
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 80
exclude = '''
build/
| wheelhouse/
| dist/
| packages/
| \.hg/
| \.mypy_cache/
| \.venv/
| mercurial/thirdparty/
'''
skip-string-normalization = true
quiet = true
......@@ -66,7 +66,6 @@
COPYING
Makefile
README.rst
black.toml
hg
hgeditor
hgweb.cgi
......
#require black test-repo
$ cd $RUNTESTDIR/..
$ black --config=black.toml --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`
$ black --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment