Contents Menu Expand
flake8-sphinx-links 0.2.1 documentation
flake8-sphinx-links 0.2.1 documentation
  • Home

Documentation

  • Usage
  • Examples
  • API Reference

Contributing

  • Overview
  • Coding style
  • Automated tests
  • Type Annotations
  • Build documentation locally
  • Downloading source code

Links

  • GitHub
  • PyPI

API Reference¶

A Flake8 plugin to check docstrings for double backticked strings which should be links to the Python documentation.

Classes:

Plugin(tree)

Flake8 plugin to check docstrings for double backticked strings which should be links to the Python documentation.

Visitor()

AST visitor to check docstrings for double backticked strings which should be links to the Python documentation.

Data:

exc

List of keywords which should become :py:exc:`<keyword>`

py_obj

List of keywords which should become :py:obj:`<keyword>`

py_obj_python

List of keywords that should become :py:obj:`python:<keyword>` to prevent conflict with Sphinx objects.

regex

Regex to match keywords that should be Sphinx links.

class Plugin(tree)[source]¶

Bases: Plugin[Visitor]

Flake8 plugin to check docstrings for double backticked strings which should be links to the Python documentation.

Attributes:

name

version

Classes:

visitor_class

alias of Visitor

name: str = 'flake8_sphinx_links'¶
version: str = '0.2.1'¶
visitor_class¶

alias of Visitor

class Visitor[source]¶

Bases: Visitor

AST visitor to check docstrings for double backticked strings which should be links to the Python documentation.

Methods:

visit_ClassDef(node)

visit_FunctionDef(node)

visit_Module(node)

visit_ClassDef(node)[source]¶
visit_FunctionDef(node)[source]¶
visit_Module(node)[source]¶
exc = ['BaseException', 'Exception', 'ArithmeticError', 'BufferError', 'LookupError', 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'GeneratorExit', 'ImportError', 'ModuleNotFoundError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', 'NotImplementedError', 'OSError', 'OverflowError', 'RecursionError', 'ReferenceError', 'RuntimeError', 'StopIteration', 'StopAsyncIteration', 'SyntaxError', 'IndentationError', 'TabError', 'SyntaxError', 'IndentationError', 'TabError', 'SystemError', 'SystemExit', 'TypeError', 'UnboundLocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', 'UnicodeTranslateError', 'ValueError', 'ZeroDivisionError', 'EnvironmentError', 'IOError', 'WindowsError', 'BlockingIOError', 'ChildProcessError', 'ConnectionError', 'BrokenPipeError', 'ConnectionAbortedError', 'ConnectionRefusedError', 'ConnectionResetError', 'FileExistsError', 'FileNotFoundError', 'InterruptedError', 'IsADirectoryError', 'NotADirectoryError', 'PermissionError', 'ProcessLookupError', 'TimeoutError', 'Warning', 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', 'RuntimeWarning', 'FutureWarning', 'ImportWarning', 'UnicodeWarning', 'BytesWarning', 'ResourceWarning']¶

Type:    List[str]

List of keywords which should become :py:exc:`<keyword>`

py_obj = ['True', 'False', 'None', 'NotImplemented', 'Ellipsis', '__debug__', 'quit', 'exit', 'credits', 'license']¶

Type:    List[str]

List of keywords which should become :py:obj:`<keyword>`

py_obj_python = ['copyright']¶

Type:    List[str]

List of keywords that should become :py:obj:`python:<keyword>` to prevent conflict with Sphinx objects.

regex¶

Type:    Pattern

Regex to match keywords that should be Sphinx links.

Pattern

(``)(True|False|None|NotImplemented|Ellipsis|__debug__|quit|exit|credits|license|copyright|BaseException|Exception|ArithmeticError|BufferError|LookupError|AssertionError|AttributeError|EOFError|FloatingPointError|GeneratorExit|ImportError|ModuleNotFoundError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|RecursionError|ReferenceError|RuntimeError|StopIteration|StopAsyncIteration|SyntaxError|IndentationError|TabError|SyntaxError|IndentationError|TabError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|ZeroDivisionError|EnvironmentError|IOError|WindowsError|BlockingIOError|ChildProcessError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|FileExistsError|FileNotFoundError|InterruptedError|IsADirectoryError|NotADirectoryError|PermissionError|ProcessLookupError|TimeoutError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning|BytesWarning|ResourceWarning|int|float|complex|list|tuple|range|str|bytes|bytearray|memoryview|set|frozenset|dict)(``)

Next
Overview
Previous
Examples
Copyright © 2020-2021 Dominic Davis-Foster | Built with Sphinx and @pradyunsg's Furo theme. | Show Source
Contents
  • API Reference
    • Plugin
    • Visitor
    • exc
    • py_obj
    • py_obj_python
    • regex