A Flake8 plugin to check docstrings for double backticked strings which should be links to the Python documentation.
Project description
A Flake8 plugin to check docstrings for double backticked strings which should be links to the Python documentation.
Docs |
|
---|---|
Tests |
|
PyPI |
|
Anaconda |
|
Activity |
|
QA |
|
Other |
For example, ``True`` should be py:obj:`True`, which Sphinx will render as a link to the Python documentation.
reStructuredText .rst files are not currently checked.
Installation
flake8_sphinx_links can be installed from PyPI or Anaconda.
To install with pip:
$ python -m pip install flake8_sphinx_links
To install with conda:
First add the required channels
$ conda config --add channels http://conda.anaconda.org/conda-forge $ conda config --add channels http://conda.anaconda.org/domdfcoding
Then install
$ conda install flake8_sphinx_links
Flake8 codes
Code |
Description |
---|---|
SXL001 |
Double backticked variable should be a link to Python documentation. |
Use as a pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies: [flake8-sphinx-links==0.2.1]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flake8_sphinx_links-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d23df3a931f6a6b83a40a0dbb51e0d2706f16b3d22099c76536baaf6ffd19b |
|
MD5 | 7ab66795905503a67a1a247277103230 |
|
BLAKE2b-256 | e8d5f7bfe86108e4d3d127e9091c8edc496b8ff68914b6db83ac6e4c71012069 |
Hashes for flake8_sphinx_links-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3921d016836fc6c6b32185409accf425393b31294c75839b4f0a1f07fffb3b7e |
|
MD5 | 0e87d56c52e416b6be7d7de89cdd5872 |
|
BLAKE2b-256 | 1cf190ab5b7fb7aed548bc1c33329bbd0aa89ccc18d8a871e92e3a23b6de0d92 |