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

Improve description of --add-ignore option #231

Closed
cdeil opened this Issue Jan 22, 2017 · 7 comments

Comments

Projects
4 participants
@cdeil
Copy link

cdeil commented Jan 22, 2017

I think the current --add-ignore option is a copy of --add-select, and it should be changed from "errors to check" to "errors to ignore", no?

  --add-select=<codes>  amend the list of errors to check for by specifying
                        more error codes to check.
  --add-ignore=<codes>  amend the list of errors to check for by specifying
                        more error codes to ignore.

An unrelated suggestion concerning:

$ pydocstyle --convention=numpy --ignore=D410
Cannot pass both ignore and convention. They are mutually exclusive.

I would have found it useful if that message had this at the end:

You can use `--add-ignore` instead of `--ignore`.
@cdeil

This comment has been minimized.

Copy link

cdeil commented Apr 28, 2017

Is it possible to select just one given code with the number convention?

This doesn't work:

$ pydocstyle --select=D412 --convention=numpy
Cannot pass both select and convention. They are mutually exclusive.
@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Apr 28, 2017

You can do pydocstyle --convention=numpy --add-select=D412.

@cdeil

This comment has been minimized.

Copy link

cdeil commented Apr 28, 2017

@Nurdok - What pydocstyle --convention=numpy --add-select=D412 does is to add D412 to a list of default codes, i.e. in the report I get D412 but a lot of other things as well.

I want only D412, no other codes.

@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Apr 28, 2017

Oh, so just do pydocstyle --select=D412.

@Nurdok Nurdok added this to Planned in Pydocstyle 2.1.1 May 5, 2017

@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Aug 6, 2017

Looking back at this, it looks like the flag description is precise, but perhaps non-intuitive:

  --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 (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
  --add-select=<codes>  amend the list of errors to check for by specifying
                        more error codes to check.
  --add-ignore=<codes>  amend the list of errors to check for by specifying
                        more error codes to ignore.

The phrasing was done to emphasize the point that the --add-XXX flags only amend the list. I'm not sure what a better per-flag description can be, or how to make this more clear. Perhaps we just need to add a longer, general description of error code selection in the --help text?

@sigmavirus24

This comment has been minimized.

Copy link
Member

sigmavirus24 commented Aug 6, 2017

Idea: We're all programmers here using Python so we should all be familiar with appending to lists. Perhaps those descriptions could say append to the list of errors ... Alternatively, extend the list of errors ...?

@shacharoo shacharoo moved this from Planned to In Progress / Assigned in Pydocstyle 2.1.1 Sep 22, 2017

@shacharoo shacharoo self-assigned this Sep 22, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 22, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 22, 2017

@shacharoo shacharoo referenced this issue Sep 22, 2017

Merged

Better help section #283

2 of 2 tasks complete

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 22, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 22, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 22, 2017

@shacharoo

This comment has been minimized.

Copy link
Member

shacharoo commented Sep 23, 2017

Solved by #283 .

@shacharoo shacharoo closed this Sep 23, 2017

@shacharoo shacharoo moved this from In Progress / Assigned to Done in Pydocstyle 2.1.1 Sep 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment