Usage¶
This library provides the Flake8 plugin flake8-sphinx-links
to check docstrings for double backticked
strings which should be links to the Python documentation.
For example, ``True`` should be py:obj:`True`, which Sphinx will render as a link to the Python documentation. See Examples for further examples.
reStructuredText .rst files are not currently checked.
Flake8 codes¶
Code |
Description |
---|---|
SXL001 |
Double backticked strings should be a link to Python documentation. |
Pre-commit hook¶
flake8-sphinx-links
can also be used as a pre-commit
hook
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-sphinx-links==0.2.2