Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
krassowski opened this issue Mar 12, 2025 · 0 comments

Comments

@krassowski
Copy link
Member

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant