跳转到主要内容

一个Flake8插件,用于检查文档字符串中是否存在应该链接到Python文档的双反引号字符串。

项目描述

一个Flake8插件,用于检查文档字符串中是否存在应该链接到Python文档的双反引号字符串。

文档

Documentation Build Status Docs Check Status

测试

Linux Test Status Windows Test Status macOS Test Status Coverage

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Anaconda

Conda - Package Version Conda - Platform

活动

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

其他

License GitHub top language Requirements Status

例如,``True`` 应该是 py:obj:`True`,Sphinx 会将其渲染为指向 Python 文档的链接。

当前不检查 reStructuredText .rst 文件。

安装

flake8_sphinx_links 可以从 PyPI 或 Anaconda 安装。

使用 pip 安装

$ python -m pip install flake8_sphinx_links

使用 conda 安装

  • 首先添加所需的通道

$ conda config --add channels https://conda.anaconda.org/conda-forge
$ conda config --add channels https://conda.anaconda.org/domdfcoding
  • 然后安装

$ conda install flake8_sphinx_links

Flake8 代码

代码

描述

SXL001

双反引号变量应该是指向 Python 文档的链接。

用作 pre-commit 钩子

有关说明,请参阅 pre-commit

示例 .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]

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

flake8_sphinx_links-0.2.2.tar.gz (6.4 kB 查看哈希值)

上传时间

构建分发

flake8_sphinx_links-0.2.2-py3-none-any.whl (17.8 kB 查看哈希值)

上传时间 Python 3

由...

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面