peterprescott / numdoclinter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

numdoclinter


NB: Should work with Python 3.7. May not work with later (or earlier) versions, as Python's abstract syntax may change from version to version.


Inspired by numdoclint, but wanting to try a slightly different approach...

Specifically, instead of trying to parse signatures and docstrings using regex, numdoclinter uses the abstract syntax tree built into Python's standard library ast package.

Basically, all we do is:

  1. recurse through folders to parse modules and list functions,
  2. parse function signatures and type annotations,
  3. parse function docstrings,
  4. check that the signature and docstring are consistent and contain everything required.

You can clone this repo and then pip install it, and then you can run numdoclinter (or just ndlinter) from your command line on whatever folder you like.

git clone https://github.com/peterprescott/numdoclinter
cd numdoclinter
pip install .
ndlinter --help

About

License:MIT License


Languages

Language:Python 100.0%