Commit deb0515c 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!

Differential Revision: https://phab.mercurial-scm.org/D9834
parent 5aab5dcddc78
Pipeline #18476 passed with stages
in 26 minutes and 11 seconds
[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 @@ clang-format:pattern = set:(**.c or **.cc or **.h) and not "include:contrib/clan
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 @@ Prevent adding new files in the root directory accidentally.
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/**'`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment