Skip to content

Commit 087c704

Browse files
committed
Add more links to facilitate references
1 parent d1749d0 commit 087c704

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/source/development/contributing.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ many errors as possible, but it may not correct *all* of them. Thus, it is
635635
recommended that you run ``cpplint`` to double check and make any other style
636636
fixes manually.
637637

638+
.. _contributing.code-formatting:
639+
638640
Python (PEP8 / black)
639641
~~~~~~~~~~~~~~~~~~~~~
640642

@@ -656,6 +658,9 @@ apply ``black`` as you edit files.
656658
You should use a ``black`` version >= 19.10b0 as previous versions are not compatible
657659
with the pandas codebase.
658660

661+
If you wish to run these checks automatically, we encourage you to use
662+
:ref:`pre-commits <contributing.pre-commit>` instead.
663+
659664
One caveat about ``git diff upstream/master -u -- "*.py" | flake8 --diff``: this
660665
command will catch any stylistic errors in your changes specifically, but
661666
be beware it may not catch all of them. For example, if you delete the only
@@ -727,14 +732,16 @@ to automatically format imports correctly. This will modify your local copy of t
727732

728733
The `--recursive` flag can be passed to sort all files in a directory.
729734

730-
Alternatively, you can run a command similar to what was suggested for ``black`` and ``flake8`` right above::
735+
Alternatively, you can run a command similar to what was suggested for ``black`` and ``flake8`` :ref:`right above <contributing.code-formatting>`::
731736

732737
git diff upstream/master --name-only -- "*.py" | xargs -r isort
733738

734739
Where similar caveats apply if you are on OSX or Windows.
735740

736741
You can then verify the changes look ok, then git :ref:`commit <contributing.commit-code>` and :ref:`push <contributing.push-code>`.
737742

743+
.. _contributing.pre-commit:
744+
738745
Pre-Commit
739746
~~~~~~~~~~
740747

0 commit comments

Comments
 (0)