jepperaskdk / pydoctest

Python docstring signature verification
MIT License
20 stars 3 forks source link

args and kwargs are not recognized as generic arguments #48

Closed JenniferHem closed 1 year ago

JenniferHem commented 1 year ago

Hi,

I just came across an error (or expected behavior?):

I have the Fuction with the docstring

def mocked_requests_get(*args: str, **kwargs: str) -> Response:
    """Mock the expected Response from the API based on the received url via args.

    Returns
    -------
    Response
        response object
    """

which leads to the Error:

def mocked_requests_get(✖*args, ✖**kwargs) -> ✓Response:
    """
    :param None: ✖
    :param None: ✖
    :return: ✓
    """
E103: parameters missing

Not sure if this should be the case usually I would not annotate args/kwargs as they are no specific function arguments. Or is my notion wrong here?

We are using numpy type docstrings in case this is relevant. Happy to provide more info if I forgot anything relevant.

jepperaskdk commented 1 year ago

@JenniferHem I don't think that output is produced by pydoctest - are you perhaps using a different tool?

JenniferHem commented 1 year ago

whoops so sorry! Too many linters already on a monday!