]> git.madduck.net Git - etc/vim.git/blob - docs/index.rst

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:

Move test for g:load_black to improve plugin performance (GH-2896)
[etc/vim.git] / docs / index.rst
1 .. black documentation master file, created by
2    sphinx-quickstart on Fri Mar 23 10:53:30 2018.
3
4 The uncompromising code formatter
5 =================================
6
7     “Any color you like.”
8
9 By using *Black*, you agree to cede control over minutiae of
10 hand-formatting. In return, *Black* gives you speed, determinism, and
11 freedom from `pycodestyle` nagging about formatting. You will save time
12 and mental energy for more important matters.
13
14 *Black* makes code review faster by producing the smallest diffs
15 possible. Blackened code looks the same regardless of the project
16 you're reading. Formatting becomes transparent after a while and you
17 can focus on the content instead.
18
19 Try it out now using the `Black Playground <https://black.vercel.app>`_.
20
21 .. admonition:: Note - Black is now stable!
22
23    *Black* is `successfully used <https://github.com/psf/black#used-by>`_ by
24    many projects, small and big. *Black* has a comprehensive test suite, with efficient
25    parallel tests, our own auto formatting and parallel Continuous Integration runner.
26    Now that we have become stable, you should not expect large formatting to changes in
27    the future. Stylistic changes will mostly be responses to bug reports and support for new Python
28    syntax.
29
30    Also, as a safety measure which slows down processing, *Black* will check that the
31    reformatted code still produces a valid AST that is effectively equivalent to the
32    original (see the
33    `Pragmatism <./the_black_code_style/current_style.html#pragmatism>`_
34    section for details). If you're feeling confident, use ``--fast``.
35
36 .. note::
37    :doc:`Black is licensed under the MIT license <license>`.
38
39 Testimonials
40 ------------
41
42 **Mike Bayer**, author of `SQLAlchemy <https://www.sqlalchemy.org/>`_:
43
44    *I can't think of any single tool in my entire programming career that has given me a
45    bigger productivity increase by its introduction. I can now do refactorings in about
46    1% of the keystrokes that it would have taken me previously when we had no way for
47    code to format itself.*
48
49 **Dusty Phillips**, `writer <https://smile.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=dusty+phillips>`_:
50
51    *Black is opinionated so you don't have to be.*
52
53 **Hynek Schlawack**, creator of `attrs <https://www.attrs.org/>`_, core
54 developer of Twisted and CPython:
55
56    *An auto-formatter that doesn't suck is all I want for Xmas!*
57
58 **Carl Meyer**, `Django <https://www.djangoproject.com/>`_ core developer:
59
60    *At least the name is good.*
61
62 **Kenneth Reitz**, creator of `requests <http://python-requests.org/>`_
63 and `pipenv <https://docs.pipenv.org/>`_:
64
65    *This vastly improves the formatting of our code. Thanks a ton!*
66
67
68 Show your style
69 ---------------
70
71 Use the badge in your project's README.md:
72
73 .. code-block:: md
74
75    [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
76
77
78 Using the badge in README.rst:
79
80 .. code-block:: rst
81
82    .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
83       :target: https://github.com/psf/black
84
85 Looks like this:
86
87 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
88    :target: https://github.com/psf/black
89
90 Contents
91 --------
92
93 .. toctree::
94    :maxdepth: 3
95    :includehidden:
96
97    the_black_code_style/index
98
99 .. toctree::
100    :maxdepth: 3
101    :includehidden:
102    :caption: User Guide
103
104    getting_started
105    usage_and_configuration/index
106    integrations/index
107    guides/index
108    faq
109
110 .. toctree::
111    :maxdepth: 2
112    :includehidden:
113    :caption: Development
114
115    contributing/index
116    change_log
117    authors
118
119 .. toctree::
120    :hidden:
121    :caption: Project Links
122
123    GitHub <https://github.com/psf/black>
124    PyPI <https://pypi.org/project/black>
125    Chat <https://discord.gg/RtVdv86PrH>
126
127 Indices and tables
128 ==================
129
130 * :ref:`genindex`
131 * :ref:`search`