Skip to content

Commit

Permalink
add doc in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hirosassa committed Jul 10, 2021
1 parent e7827fe commit c9a7af0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.rst
Expand Up @@ -136,12 +136,12 @@ otherwise (including program error). You can use this in a CI workflow to test t
has been YAPF-formatted.

---------------------------------------------
Excluding files from formatting (.yapfignore)
Excluding files from formatting (.yapfignore or pyproject.toml)
---------------------------------------------

In addition to exclude patterns provided on commandline, YAPF looks for additional
patterns specified in a file named ``.yapfignore`` located in the working directory from
which YAPF is invoked.
patterns specified in a file named ``.yapfignore`` or ``pyproject.toml`` located in the
working directory from which YAPF is invoked.

``.yapfignore``'s syntax is similar to UNIX's filename pattern matching::

Expand All @@ -152,6 +152,15 @@ which YAPF is invoked.

Note that no entry should begin with `./`.

If you use ``pyproject.toml``, exclude patterns are specified by ``ignore_pattens`` key
in ``[tool.yapfignore]`` section. For example:

.. code-block:: ini
[tool.yapfignore]
ignore_patterns="""
temp/**/*.py
temp2/*.py
"""
Formatting style
================
Expand Down

0 comments on commit c9a7af0

Please sign in to comment.