]> git.madduck.net Git - etc/vim.git/blob - pyproject.toml

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix a crash when `# fmt: on` is used on a different block level than `# fmt: off...
[etc/vim.git] / pyproject.toml
1 # Example configuration for Black.
2
3 # NOTE: you have to use single-quoted strings in TOML for regular expressions.
4 # It's the equivalent of r-strings in Python.  Multiline strings are treated as
5 # verbose regular expressions by Black.  Use [ ] to denote a significant space
6 # character.
7
8 [tool.black]
9 line-length = 88
10 target-version = ['py36', 'py37', 'py38']
11 include = '\.pyi?$'
12 extend-exclude = '''
13 /(
14   # The following are specific to Black, you probably don't want those.
15   | blib2to3
16   | tests/data
17   | profiling
18 )/
19 '''
20 # We use preview style for formatting Black itself. If you
21 # want stable formatting across releases, you should keep
22 # this off.
23 preview = true
24
25 # Build system information and other project-specific configuration below.
26 # NOTE: You don't need this in your own Black configuration.
27
28 [build-system]
29 requires = ["setuptools>=45.0", "setuptools_scm[toml]>=6.3.1", "wheel"]
30 build-backend = "setuptools.build_meta"
31
32 [tool.cibuildwheel]
33 build-verbosity = 1
34 # So these are the environments we target:
35 # - Python: CPython 3.6+ only
36 # - Architecture (64-bit only): amd64 / x86_64, universal2, and arm64
37 # - OS: Linux (no musl), Windows, and macOS
38 build = "cp3*-*"
39 skip = ["*-manylinux_i686", "*-musllinux_*", "*-win32", "pp-*"]
40 before-build = ["pip install -r .github/mypyc-requirements.txt"]
41 # This is the bare minimum needed to run the test suite. Pulling in the full
42 # test_requirements.txt would download a bunch of other packages not necessary
43 # here and would slow down the testing step a fair bit.
44 test-requires = ["pytest>=6.1.1"]
45 test-command = 'pytest {project} -k "not incompatible_with_mypyc"'
46 test-extras = ["d"," jupyter"]
47 # Skip trying to test arm64 builds on Intel Macs. (so cross-compilation doesn't
48 # straight up crash)
49 test-skip = ["*-macosx_arm64", "*-macosx_universal2:arm64"]
50
51 [tool.cibuildwheel.environment]
52 BLACK_USE_MYPYC = "1"
53 MYPYC_OPT_LEVEL = "3"
54 MYPYC_DEBUG_LEVEL = "0"
55 # The dependencies required to build wheels with mypyc aren't specified in
56 # [build-system].requires so we'll have to manage the build environment ourselves.
57 PIP_NO_BUILD_ISOLATION = "no"
58 # CPython 3.11 wheels aren't available for aiohttp and building a Cython extension
59 # from source also doesn't work.
60 AIOHTTP_NO_EXTENSIONS = "1"
61
62 [tool.cibuildwheel.linux]
63 before-build = [
64     "pip install -r .github/mypyc-requirements.txt",
65     "yum install -y clang gcc",
66 ]
67
68 [tool.cibuildwheel.linux.environment]
69 BLACK_USE_MYPYC = "1"
70 MYPYC_OPT_LEVEL = "3"
71 MYPYC_DEBUG_LEVEL = "0"
72 PIP_NO_BUILD_ISOLATION = "no"
73 # Black needs Clang to compile successfully on Linux.
74 CC = "clang"
75 AIOHTTP_NO_EXTENSIONS = "1"
76
77 [tool.cibuildwheel.windows]
78 # For some reason, (compiled) mypyc is failing to start up with "ImportError: DLL load
79 # failed: A dynamic link library (DLL) initialization routine failed." on Windows for
80 # at least 3.6. Let's just use interpreted mypy[c].
81 # See also: https://github.com/mypyc/mypyc/issues/819.
82 before-build = [
83     "pip install -r .github/mypyc-requirements.txt --no-binary mypy"
84 ]
85
86 [tool.isort]
87 atomic = true
88 profile = "black"
89 line_length = 88
90 skip_gitignore = true
91 skip_glob = ["src/blib2to3", "tests/data", "profiling"]
92 known_first_party = ["black", "blib2to3", "blackd", "_black_version"]
93
94 [tool.pytest.ini_options]
95 # Option below requires `tests/optional.py`
96 addopts = "--strict-config --strict-markers"
97 optional-tests = [
98   "no_blackd: run when `d` extra NOT installed",
99   "no_jupyter: run when `jupyter` extra NOT installed",
100 ]
101 markers = [
102   "incompatible_with_mypyc: run when testing mypyc compiled black"
103 ]
104 xfail_strict = true
105 filterwarnings = [
106     "error",
107     # this is mitigated by a try/catch in https://github.com/psf/black/pull/2974/
108     # this ignore can be removed when support for aiohttp 3.7 is dropped.
109     '''ignore:Decorator `@unittest_run_loop` is no longer needed in aiohttp 3\.8\+:DeprecationWarning''',
110     # this is mitigated by a try/catch in https://github.com/psf/black/pull/3198/
111     # this ignore can be removed when support for aiohttp 3.x is dropped.
112     '''ignore:Middleware decorator is deprecated since 4\.0 and its behaviour is default, you can simply remove this decorator:DeprecationWarning''',
113     # this is mitigated by https://github.com/python/cpython/issues/79071 in python 3.8+
114     # this ignore can be removed when support for 3.7 is dropped.
115     '''ignore:Bare functions are deprecated, use async ones:DeprecationWarning''',
116     # aiohttp is using deprecated cgi modules - Safe to remove when fixed:
117     # https://github.com/aio-libs/aiohttp/issues/6905
118     '''ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning''',
119 ]