terrencepreilly / darglint

A python documentation linter which checks that the docstring description matches the definition.
MIT License
481 stars 41 forks source link

"short" strictness doesn't work for Numpy docstings #138

Closed otchita closed 3 years ago

otchita commented 3 years ago

Hello,

I've encountered an issue when using the short strictness for Numpy style documented functions. Here are the reproducibility steps:

# test.py
def function(arg1):
    """Docstring.

    Parameters
    ----------
    arg123
        the first argument.
    """
    print("Hello world !")

When running the module using short strictness, I get no errors:

> darglint test.py -s numpy -z "short"

When running it with full strictness, I get the errors that I am also supposed to obtain by running it with short strictness.

> darglint test.py -s numpy
test.py:function2:4: DAR102: + arg123
test.py:function2:4: DAR101: - arg1