bayesimpact / pylint-doc-spacing

PyLint plugin to check the presence of a blank line after any documentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pylint Doc Spacing Checker

Latest Version

A Pylint plugin to check for the presence/absence of spacing after documentation strings.

Installation

Installing with pip:

pip install pylint-doc-spacing

Usage

To use pylint-doc-spacing, it must be loaded as a plugin when running pylint:

pylint --load-plugins pylint_doc_spacing <module-or-package>

Configuration

The consistency of doc spacing can be configured:

  • one-line: enforces having exactly one empty line after the documentation (the default).
  • none: enforces no blank line after the documentation.
  • any: does not enforce anything.

You can decide on different spacing for different kind of documentation by changing the following Pylint configs:

  • module-doc-spacing for the modules' documentation.
  • class-doc-spacing for the classes' documentation.
  • function-doc-spacing for the functions and methods documentation.

Example of configuration in .pylintrc:

[MISCELLANEOUS]
function-doc-spacing=none
class-doc-spacing=only-one
module-doc-spacing=any

About

PyLint plugin to check the presence of a blank line after any documentation.


Languages

Language:Python 100.0%