Skip to main content

A utility for ensuring Google-style docstrings stay up to date with the source code.

Project description

# Darglint

A limited docstring linter which checks that function/method parameters
are defined in their docstrings. *Darglint* expects docstrings to be
formatted using the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html).

Darglint is in a very early stage, and fails for a lot of things.
Certain features, such as a robust command-line interface, still
do not exist.

## Installation


## Usage

Given a python source file, `serializers.py`, you would check the docstrings
as follows:

```
darglint serializers.py
```

## Features planned and implemented

- [x] Function definitions can be checked.
- [x] Methods definitions of top-level class can be checked.
- [x] Line number printout for function/method definition.
- [ ] Add type hint integration.
- [ ] Add support for python versions earlier than 3.6.
(The typing module is being used, which is the only real
limiting factor.)
- [ ] Syntastic support. (Syntastic is not accepting new checkers until
their next API stabilizes, so this may take some time.)
- [ ] Add command line interface.

## Development

Install `darglint`. First, clone the repository:

```
git clone https://github.com/terrencepreilly/darglint.git
```

`cd` into the directory, create a virtual environment (optional), then setup:

```
cd darglint/
virtualenv -p python3.6 .env
source .env/bin/activate
pip install -e .
```

You can run the tests using

```
python setup.py test
```

Or, install `pytest` manually, `cd` to the project's root directory,
and run

```
pytest
```

Contributions welcome.


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

darglint-0.0.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

darglint-0.0.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file darglint-0.0.2.tar.gz.

File metadata

  • Download URL: darglint-0.0.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for darglint-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e238fe12c1c3d98fa1b983a299c3fce78d9d227c7a81f4cf388a9bfc03144532
MD5 3f31cacb4c8e4f29477944c65b36f746
BLAKE2b-256 057a948a490f057898ffe0864326c9266b79e01056a738de942d8c3ccc65acf5

See more details on using hashes here.

File details

Details for the file darglint-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for darglint-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8db5bd4f0c4989ff4d3d102471292309181cf7cb308c27736a2d44b444c130e0
MD5 988660144a47cbe01235936a2f241cfa
BLAKE2b-256 c413d0b576077bbe6b5df70a9dff522b54b12566f676cbc774fe8f9cb46e9ebc

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