Darglint

Latest version: v1.8.1

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

0.6.0

Added

- Minimum strictness configuration option. You can now specify a minimum
amount of strictness to have when checking docstrings. Strictness does
not affect whether the docstring will be checked or not; it only changes
the amount of checking which is done. For example, if your config file
looks like

[darglint]
strictness=short

Then the following would pass with no errors:

def double(x):
"""Returns the number, multiplied by two."""
return x * 2

The following levels of strictness are available:

- short: One-line descriptions are acceptable;
anything more and the docstring will be fully checked.

- long: One-line descriptions and descriptions
without arguments/returns/yields/etc. sections will be
allowed. Anything more, and the docstring will be fully
checked.

- full: (Default) Docstrings will be fully
checked.

0.5.8

Fixed

- Syntax error when logging about unusual raises description.
(See Issue 34).

0.5.7

Fixed

- Handle async function definitions. Previously they were simply skipped.
Thanks to zeebonk!

0.5.6

Fixed

- Erroneous I203 was being raised for return type when one of the
type annotations was missing (it should only ever be raised when
both type signatures are present.) Thanks to asford!

0.5.5

Fixed

- Try-block handlers were not included when tranversing the function
ast. This meant that return or yield statements in the except-block
or else block would not register, and an exception would be raised.

- Allow indents in types. This lets us handle line continuation for
type signatures.

- Fix appropriate noqas not hiding S001. (Because the docstring is never
actually parsed when it's a syntax error.)

0.5.4

Fixed

- Fixed double reports from flake8. These were occurring due to the two
entry points listed in the setup file. Currently, the fix just uses two
temporary subclasses that filter the response from running Darglint.
Ideally, flake8 would not run the same program twice -- a script may want
to report more than one error code. (As is the case here.)

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.