user10106944
user10106944

Reputation:

PyLint/PyLint3 does not recognize docstrings

I wrote several Python 3 modules of the following format:

def some_module():
'''Do something.

Parameters
----------
Returns
-------
'''
# Some code

When I run PyLint or PyLint3 over the file, I get the following error:

************* Module some_module.some_module
C: 1, 0: Missing module docstring (missing-docstring)

What am I doing wrong? Does PyLint require a specific docstring style?

Upvotes: 2

Views: 3951

Answers (1)

Zak
Zak

Reputation: 12623

Have you tried indenting the doc-string, so it identified as part of the module?

def some_module():
    '''Do something.

    Parameters
    ----------
    Returns
    -------
    '''
    # Some code
    ...

Upvotes: 4

Related Questions