Skip to content

pydocstyle: addIgnore and addSelect are not respected unless convention is set #626

@krassowski

Description

@krassowski

Due to indent in:

if settings.get("convention"):
args.append("--convention=" + settings["convention"])
if settings.get("addSelect"):
args.append("--add-select=" + ",".join(settings["addSelect"]))
if settings.get("addIgnore"):
args.append("--add-ignore=" + ",".join(settings["addIgnore"]))
elif settings.get("select"):
args.append("--select=" + ",".join(settings["select"]))
elif settings.get("ignore"):
args.append("--ignore=" + ",".join(settings["ignore"]))

It is on or the other. But the docs say it is ok to use --add-ignore with say --ignore.

  Error Check Options:
    Only one of --select, --ignore or --convention can be specified. If
    none is specified, defaults to `--convention=pep257`. These three
    options select the "basic list" of error codes to check. If you wish
    to change that list (for example, if you selected a known convention
    but wish to ignore a specific error from it or add a new one) you can
    use `--add-[ignore/select]` in order to do so.

    --select=<codes>    choose the basic list of checked errors by specifying
                        which errors to check for (with a list of comma-
                        separated error codes or prefixes). for example:
                        --select=D101,D2
    --ignore=<codes>    choose the basic list of checked errors by specifying
                        which errors to ignore out of all of the available
                        error codes (with a list of comma-separated error
                        codes or prefixes). for example: --ignore=D101,D2
    --convention=<name>
                        choose the basic list of checked errors by specifying
                        an existing convention. Possible conventions: pep257,
                        numpy, google.
    --add-select=<codes>
                        add extra error codes to check to the basic list of
                        errors previously set by --select, --ignore or
                        --convention.
    --add-ignore=<codes>
                        ignore extra error codes by removing them from the
                        basic list previously set by --select, --ignore or
                        --convention.

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