Skip to content

Commit

Permalink
Merge pull request #14781 from nstarman/fix_14737
Browse files Browse the repository at this point in the history
Add notes about `ruff` for affiliated packages.
  • Loading branch information
nstarman committed May 7, 2023
2 parents b3e0f7d + f112854 commit f3934b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/common_links.txt
Expand Up @@ -76,6 +76,7 @@

.. _Python: https://www.python.org/
.. |minimum_python_version| replace:: {minimum_python}
.. _PEP8: https://www.python.org/dev/peps/pep-0008/

.. Astropy
.. _`Astropy mailing list`: https://mail.python.org/mailman/listinfo/astropy
Expand Down
15 changes: 9 additions & 6 deletions docs/development/codeguide.rst
Expand Up @@ -166,13 +166,15 @@ Coding Style/Conventions
]


* Our testing infrastructure currently enforces a subset of the PEP8 style
guide. In addition, these checks also enforce
`isort <https://pycqa.github.io/isort/>`_ to sort the module imports.
* Our testing infrastructure currently enforces a subset of the PEP8_ style guide. In
addition, these checks also enforce `isort <https://pycqa.github.io/isort/>`_ to sort
the module imports and a large set of style-checks supported by ruff_.

* We provide a ``pre-commit`` hook which automatically enforces and fixes
(whenever possible) the coding style, see :ref:`pre-commit` for details on
how to setup and use this.
* We provide a ``pre-commit`` hook which automatically enforces and fixes (whenever
possible) the coding style, see :ref:`pre-commit` for details on how to set up and
use this. We note that the particular set of PEP8_ and style-related checks that are
used in Astropy do not need to be used in affiliated packages. In particular, the
set of ruff_ checks is not required for affiliated packages.

* Alternately, you can manually check and fix your changes by running the
following `tox <https://tox.readthedocs.io/>`__ command::
Expand Down Expand Up @@ -570,3 +572,4 @@ Further tips and hints relating to the coding guidelines are included below.
.. _matplotlib: https://matplotlib.org/
.. _Cython: https://cython.org/
.. _PyPI: https://pypi.org/project
.. _ruff: https://beta.ruff.rs/docs

0 comments on commit f3934b0

Please sign in to comment.