Skip to content

Validation check YD01 not implemented properly #365

Closed
@martinlackner

Description

@martinlackner

Hello!

The validation check YD01 is not implemented properly. The specific code in validate.py is the following:

if not doc.yields and "yield" in doc.method_source:

Since doc.method_source also contains the docstring, this condition is also satisfied if "yield" occurs in the docstring (where it might be used as a regular word).

I have encountered this bug in a function that did not contain a yield and it took me quite a while to figure out what was wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions