60 lines
2.0 KiB
TOML
60 lines
2.0 KiB
TOML
# Example configuration for Black.
|
|
|
|
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
|
|
# It's the equivalent of r-strings in Python. Multiline strings are treated as
|
|
# verbose regular expressions by Black. Use [ ] to denote a significant space
|
|
# character.
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
target-version = ['py36', 'py37', 'py38']
|
|
include = '\.pyi?$'
|
|
extend-exclude = '''
|
|
/(
|
|
# The following are specific to Black, you probably don't want those.
|
|
| blib2to3
|
|
| tests/data
|
|
| profiling
|
|
)/
|
|
'''
|
|
# We use preview style for formatting Black itself. If you
|
|
# want stable formatting across releases, you should keep
|
|
# this off.
|
|
preview = true
|
|
|
|
# Build system information and other project-specific configuration below.
|
|
# NOTE: You don't need this in your own Black configuration.
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=45.0", "setuptools_scm[toml]>=6.3.1", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.isort]
|
|
atomic = true
|
|
profile = "black"
|
|
line_length = 88
|
|
skip_gitignore = true
|
|
skip_glob = ["src/blib2to3", "tests/data", "profiling"]
|
|
known_first_party = ["black", "blib2to3", "blackd", "_black_version"]
|
|
|
|
[tool.pytest.ini_options]
|
|
# Option below requires `tests/optional.py`
|
|
addopts = "--strict-config --strict-markers"
|
|
optional-tests = [
|
|
"no_blackd: run when `d` extra NOT installed",
|
|
"no_jupyter: run when `jupyter` extra NOT installed",
|
|
]
|
|
markers = [
|
|
"incompatible_with_mypyc: run when testing mypyc compiled black"
|
|
]
|
|
xfail_strict = true
|
|
filterwarnings = [
|
|
"error",
|
|
# this is mitigated by a try/catch in https://github.com/psf/black/pull/2974/
|
|
# this ignore can be removed when support for aiohttp 3.7 is dropped.
|
|
'''ignore:Decorator `@unittest_run_loop` is no longer needed in aiohttp 3\.8\+:DeprecationWarning''',
|
|
# this is mitigated by https://github.com/python/cpython/issues/79071 in python 3.8+
|
|
# this ignore can be removed when support for 3.7 is dropped.
|
|
'''ignore:Bare functions are deprecated, use async ones:DeprecationWarning''',
|
|
]
|