Skip to content

Commit

Permalink
Documentation fixes for ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv committed Mar 25, 2018
1 parent 0677a53 commit 9e31754
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In terms of inspiration, *Black* is about as configurable as *gofmt* and
*rustfmt* are. This is deliberate.

Bug reports and fixes are always welcome! Please follow the issue
template for best results.
template on GitHub for best results.

Before you suggest a new feature or configuration knob, ask yourself why
you want it. If it enables better integration with some workflow, fixes
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ flake8 = "*"
flake8-bugbear = "*"
flake8-mypy = "*"
mypy = "*"
recommonmark = "*"
Sphinx = "*"
twine = ">=1.11.0rc1"
133 changes: 129 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 11 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@ original. This slows it down. If you're feeling confident, use
``--fast``.


## Installation

*Black* can be installed by running `pip install black`. It requires
Python 3.6.0+ to run but you can reformat Python 2 code with it, too.
*Black* is able to parse all of the new syntax supported on Python 3.6
but also *effectively all* the Python 2 syntax at the same time.


## Usage

*Black* can be installed by running `pip install black`.

```
black [OPTIONS] [SRC]...
Expand Down Expand Up @@ -262,27 +269,6 @@ Use the badge in your project's README.md:
Looks like this: [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)



## Tests

Just run:

```
python setup.py test
```

## This tool requires Python 3.6.0+ to run

But you can reformat Python 2 code with it, too. *Black* is able to parse
all of the new syntax supported on Python 3.6 but also *effectively all*
the Python 2 syntax at the same time.

By making the code exclusively Python 3.6+, I'm able to focus on the
quality of the formatting and re-use all the nice features of the new
releases (check out [pathlib](https://docs.python.org/3/library/pathlib.html) or
f-strings) instead of wasting cycles on Unicode compatibility, and so on.


## License

MIT
Expand Down Expand Up @@ -402,3 +388,6 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md).
## Authors

Glued together by [Łukasz Langa](mailto:lukasz@langa.pl).

[Model T logo](https://thenounproject.com/term/model-t/16785/) by Alex
Valdivia from the Noun Project.
Binary file added docs/_static/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import sys

import recommonmark
from recommonmark.parser import CommonMarkParser


sys.path.insert(0, os.path.abspath('.' ))
Expand Down Expand Up @@ -52,7 +52,7 @@
templates_path = ['_templates']

source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
'.md': CommonMarkParser,
}

# The suffix(es) of source filenames.
Expand Down Expand Up @@ -97,12 +97,14 @@

html_theme_options = {
'show_related': True,
'description': 'The uncompromising Python code formatter',
'description': '“Any color you like.”',
'github_button': True,
'github_user': 'ambv',
'github_repo': 'black',
'github_button': True,
'github_type': 'star',
'show_powered_by': True,
'fixed_sidebar': True,
'logo': 'logo2.png',
}


Expand Down Expand Up @@ -162,7 +164,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'black', 'Documentation for black',
(master_doc, 'black', 'Documentation for Black',
[author], 1)
]

Expand Down Expand Up @@ -205,4 +207,4 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/3/': None}
intersphinx_mapping = {'https://docs.python.org/3/': None}
1 change: 1 addition & 0 deletions docs/contributing.md
9 changes: 0 additions & 9 deletions docs/contributors_guide.md

This file was deleted.

21 changes: 9 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
.. black documentation master file, created by
sphinx-quickstart on Fri Mar 23 10:53:30 2018.
Black
=====
The uncompromising code formatter
=================================

**Black** is the uncompromising Python code formatter.

By using *Black*, you
agree to cease control over minutiae of hand-formatting. In return,
*Black* gives you speed, determinism, and freedom from `pycodestyle`
nagging about formatting. You will save time and mental energy for
more important matters.
By using *Black*, you agree to cease control over minutiae of
hand-formatting. In return, *Black* gives you speed, determinism, and
freedom from `pycodestyle` nagging about formatting. You will save time
and mental energy for more important matters.

*Black* makes code review faster by producing the smallest diffs
possible. Blackened code looks the same regardless of the project
Expand All @@ -19,7 +16,7 @@ can focus on the content instead.

.. note::

Black is an early pre-release.
`Black is an early pre-release <usage.html#note-this-tool-is-alpha-quality-at-the-moment>`_.


Testimonials
Expand Down Expand Up @@ -51,9 +48,9 @@ Contents

usage
technical_philosophy
contributors_guide
contributing
changelog


Indices and tables
==================
Expand Down

0 comments on commit 9e31754

Please sign in to comment.