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 https://conda.anaconda.org/conda-forge $ conda config --add channels https://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.2]
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f0387ad9e2b408748cfa299c83daddad9184225cd7bc5759f9f7705f7d9445a |
|
MD5 | 8a6abb7a7f9c24a56dc94e3f4e4efbf4 |
|
BLAKE2b-256 | aaf8e2aeccc391fceff71713ae06fbcefb438c7314bcd3368f196ef0d7f6c427 |
Hashes for flake8_sphinx_links-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 059479f9f53f559c794caba63fe7914b8e0ae75137a5fe8e394ab9c35b072715 |
|
MD5 | baf7292e149e58c543631bcdd716cf96 |
|
BLAKE2b-256 | 8f93fa5d2b7e7930f47e588de775c8b6694b7c0cefb75f9dace2cc98b668eaa6 |