Skip to content

Commit

Permalink
Add a paragraph describing our stance on Python typing (#1979)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Aug 6, 2024
1 parent 45cbf41 commit 9e30a06
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ For MySQL/MariaDB in a ``mysql`` shell::
Style
-----

The Django Debug Toolbar uses `black <https://github.com/psf/black>`__ to
format code and additionally uses ruff. The toolbar uses
`pre-commit <https://pre-commit.com>`__ to automatically apply our style
guidelines when a commit is made. Set up pre-commit before committing with::
The Django Debug Toolbar uses `ruff <https://github.com/astral-sh/ruff/>`__ to
format and lint Python code. The toolbar uses `pre-commit
<https://pre-commit.com>`__ to automatically apply our style guidelines when a
commit is made. Set up pre-commit before committing with::

$ pre-commit install

Expand All @@ -129,6 +129,18 @@ To reformat the code manually use::

$ pre-commit run --all-files


Typing
------

The Debug Toolbar has been accepting patches which add type hints to the code
base, as long as the types themselves do not cause any problems or obfuscate
the intent.

The maintainers are not committed to adding type hints and are not requiring
new code to have type hints at this time. This may change in the future.


Patches
-------

Expand Down

0 comments on commit 9e30a06

Please sign in to comment.