summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code/coding-style.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2023-04-16 19:14:09 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-17 07:44:29 +0200
commit26f181939ebdad3811736aadeb5634bbdcaca025 (patch)
tree5f18511a1bb833a58b49660035b8bc800ffe9b89 /docs/internals/contributing/writing-code/coding-style.txt
parent509401313471ac0e9ef2e0c575c02db4436d6158 (diff)
[4.2.x] Used extlinks for PyPI links.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Backport of 2c4dc6476083c853b654e462c7ff65dbe0334c9e from main
Diffstat (limited to 'docs/internals/contributing/writing-code/coding-style.txt')
-rw-r--r--docs/internals/contributing/writing-code/coding-style.txt17
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt
index 812be79c91..d227e04ba0 100644
--- a/docs/internals/contributing/writing-code/coding-style.txt
+++ b/docs/internals/contributing/writing-code/coding-style.txt
@@ -45,12 +45,12 @@ Python style
* Unless otherwise specified, follow :pep:`8`.
- Use `flake8`_ to check for problems in this area. Note that our ``setup.cfg``
- file contains some excluded files (deprecated modules we don't care about
- cleaning up and some third-party code that Django vendors) as well as some
- excluded errors that we don't consider as gross violations. Remember that
- :pep:`8` is only a guide, so respect the style of the surrounding code as a
- primary goal.
+ Use :pypi:`flake8` to check for problems in this area. Note that our
+ ``setup.cfg`` file contains some excluded files (deprecated modules we don't
+ care about cleaning up and some third-party code that Django vendors) as well
+ as some excluded errors that we don't consider as gross violations. Remember
+ that :pep:`8` is only a guide, so respect the style of the surrounding code
+ as a primary goal.
An exception to :pep:`8` is our rules on line lengths. Don't limit lines of
code to 79 characters if it means the code looks significantly uglier or is
@@ -352,8 +352,8 @@ Miscellaneous
documentation </topics/i18n/index>` for details.
* Remove ``import`` statements that are no longer used when you change code.
- `flake8`_ will identify these imports for you. If an unused import needs to
- remain for backwards-compatibility, mark the end of with ``# NOQA`` to
+ :pypi:`flake8` will identify these imports for you. If an unused import needs
+ to remain for backwards-compatibility, mark the end of with ``# NOQA`` to
silence the flake8 warning.
* Systematically remove all trailing whitespaces from your code as those
@@ -376,4 +376,3 @@ For details about the JavaScript code style used by Django, see
.. _black: https://black.readthedocs.io/en/stable/
.. _editorconfig: https://editorconfig.org/
-.. _flake8: https://pypi.org/project/flake8/