Skip to main content

No project description provided

Project description

DocLinter 📝: Python Docstring Complexity Analyzer

DocLinter is a command-line tool written in Python that helps you maintain consistent and readable documentation across your projects.

Features

  • Lint the complexity of docstrings in Python files.
  • Customize analysis by specifying a maximum complexity level.
  • Easily integrate into your workflow with a simple command-line interface.

Installation

You can install DocLinter using pip:

pip install doclinter

Usage

To analyze the complexity of docstrings in Python files, use the following command:

doclinter <file_or_directory_glob>

Optional arguments:

  • --max-ari-level <int>: Specify the maximum automated readability index to report as an error.
  • -v, --verbose: Display verbose output.

Example:

doclinter my_module.py --max-ari-level 10 -v

How It Works 🛠️

DocLinter utilizes the abstract syntax tree (AST) module in Python to parse Python files and extract docstrings. It rates the complexity of each docstring using the Automated Readability Index (ARI), a formula that takes into account factors such as word count, letter count, and sentence count. Docstrings with complexity levels above the specified threshold are reported as errors.

Why Use DocLinter? 🚀

  • Enhance Documentation Quality: Ensure that your docstrings meet readability standards, making your codebase more accessible and maintainable.
  • Catch Complex Docstrings: Identify and address overly complex docstrings that may hinder understanding and collaboration among team members.
  • Improve Code Review Process: Streamline code reviews by flagging complex docstrings early in the development cycle, saving time and effort.
  • Foster Best Practices: Encourage the adoption of clear and concise documentation practices across your projects, promoting consistency and professionalism.

Roadmap 🗺️

  • Better reporting so you can find the function easily
  • Arguments for ARI complexity thresholds
  • Support linting multiple files at once
  • Package on PyPI
  • Make GitHub Actions task
  • Improve documentation
  • Support different measures of complexity (adverbs/passive voice...)
  • Parse different kinds of Python docstrings to lint relevant parts
  • Not just Python files, lint markdown too
  • Support different formulas of complexity
  • Support pyproject.toml configuration

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvement, please submit an issue or create a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

DocLinter is developed and maintained by Eugene Prout.

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

doclinter-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doclinter-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file doclinter-0.1.0.tar.gz.

File metadata

  • Download URL: doclinter-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for doclinter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2dd6cf8aa8bbe7d4e1f87c70516148a9758a83e02f17f1f2519e8e63f193296
MD5 2db570a6cec966201af846ee8e934339
BLAKE2b-256 24ff2e175ef12e282046d28fa06467260c355c039f457d86757486b02c17d7fd

See more details on using hashes here.

File details

Details for the file doclinter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: doclinter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for doclinter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7948a0aaf843d056b11a0c7ac9edf8f63e6302f7bf0859339154ccd83bf63cad
MD5 0e1e7dabe8934a2340ab7363819244d3
BLAKE2b-256 5ac06285061bbcbee4138ed0f96191a6ade5b22924d7935b668df636acaf7f8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page