Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link other interesting projects in the README #40

Merged
merged 6 commits into from
Sep 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 31 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The reformatters and linters supported are:

*New in version 1.1.0:* Support for Mypy_, Pylint_ and other linters.

.. _black: https://github.com/python/black
.. _Black: https://github.com/python/black
.. _isort: https://github.com/timothycrosley/isort
.. _Mypy: https://pypi.org/project/mypy
.. _Pylint: https://pypi.org/project/pylint
Expand All @@ -43,7 +43,7 @@ The reformatters and linters supported are:
Why?
====

You want to start unifying code style in your project using black_.
You want to start unifying code style in your project using Black_.
Maybe you also like to standardize on how to order your imports,
or do static type checking or other static analysis for your code.

Expand All @@ -53,7 +53,7 @@ you'd like to only change formatting when you're touching the code for other rea
This can also be useful
when contributing to upstream codebases that are not under your complete control.

However, partial formatting is not supported by black_ itself,
However, partial formatting is not supported by Black_ itself,
for various good reasons, and it won't be implemented either
(`134`__, `142`__, `245`__, `370`__, `511`__, `830`__).

Expand All @@ -80,7 +80,7 @@ To install, use::

The ``darker <myfile.py>`` or ``darker <directory>`` command
reads the original file(s),
formats them using black_,
formats them using Black_,
combines original and formatted regions based on edits,
and writes back over the original file(s).

Expand Down Expand Up @@ -279,9 +279,9 @@ For example:
Editor integration
==================

Many editors have plugins or recipes for integrating black_.
Many editors have plugins or recipes for integrating Black_.
You may be able to adapt them to be used with ``darker``.
See `editor integration`__ in the black_ documentation.
See `editor integration`__ in the Black_ documentation.

__ https://github.com/psf/black/#editor-integration

Expand Down Expand Up @@ -384,12 +384,12 @@ How does it work?

Darker takes a ``git diff`` of your Python files,
records which lines of current files have been edited or added since the last commit.
It then runs black_ and notes which chunks of lines were reformatted.
It then runs Black_ and notes which chunks of lines were reformatted.
Finally, only those reformatted chunks on which edited lines fall (even partially)
are applied to the edited file.

Also, in case the ``--isort`` option was specified,
isort_ is run on each edited file before applying black_.
isort_ is run on each edited file before applying Black_.
Similarly, each linter requested using the `--lint <command>` option is run,
and only linting errors/warnings on modified lines are displayed.

Expand All @@ -411,6 +411,29 @@ __ https://github.com/Carreau/darken
__ https://github.com/Carreau


Interesting code formatting and analysis projects to watch
==========================================================

The following projects are related to Black_ or Darker in some way or another.
Some of them we might want to integrate to be part of a Darker run.

- blacken-docs__ – Run Black_ on Python code blocks in documentation files
- blackdoc__ – Run Black_ on documentation code snippets
- velin__ – Reformat docstrings that follow the numpydoc__ convention
- diff-cov-lint__ – Pylint and coverage reports for git diff only
- xenon__ – Monitor code complexity
- pyupgrade__ – Upgrade syntax for newer versions of the language (see `#51`_)

__ https://github.com/asottile/blacken-docs
__ https://github.com/keewis/blackdoc
__ https://github.com/Carreau/velin
__ https://pypi.org/project/numpydoc
__ https://gitlab.com/sVerentsov/diff-cov-lint
__ https://github.com/rubik/xenon
__ https://github.com/asottile/pyupgrade
.. _#51: https://github.com/akaihola/darker/pull/51


GitHub stars trend
==================

Expand Down