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

Better help section #283

Merged
merged 5 commits into from Sep 23, 2017

Conversation

Projects
2 participants
@shacharoo
Copy link
Member

shacharoo commented Sep 22, 2017

Thanks for submitting a PR!

Please make sure to check for the following items:

  • Add unit tests and integration tests where applicable.
    If you've added a error code or changed an error code behavior,
    you should probably add or change a test case file under tests/test_cases/ and add
    it to the list under tests/test_definitions.py.
    If you've added or changed a command line option,
    you should probably add or change a test in tests/test_integration.py.
  • Add a line to the release notes (docs/release_notes.rst) under "Current Development Version".
    Make sure to include the PR number after you open and get one.

Please don't get discouraged as it may take a while to get a review.

Solves #231

@shacharoo shacharoo requested a review from Nurdok Sep 22, 2017

@shacharoo

This comment has been minimized.

Copy link
Member

shacharoo commented Sep 22, 2017

This is how it looks now:

(pydocstyle) C:\Users\shach\code\pydocstyle\src>python pydocstyle --help
Usage: pydocstyle [options] [<file|dir>...]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -e, --explain         show explanation of each error
  -s, --source          show source for each error
  -d, --debug           print debug information
  -v, --verbose         print status information
  --count               print total number of errors to stdout
  --config=<path>       use given config file and disable config discovery
  --match=<pattern>     check only files that exactly match <pattern> regular
                        expression; default is --match='(?!test_).*\.py' which
                        matches files that don't start with 'test_' but end
                        with '.py'
  --match-dir=<pattern>
                        search only dirs that exactly match <pattern> regular
                        expression; default is --match-dir='[^\.].*', which
                        matches all dirs that don't start with a dot
  --ignore-decorators=<decorators>
                        ignore any functions or methods that are decorated by
                        a function with a name fitting the <decorators>
                        regular expression; default is --ignore-decorators=''
                        which does not ignore any decorated functions.

  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.
    --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.

@shacharoo shacharoo added this to In Progress / Assigned in Pydocstyle 2.1.1 Sep 22, 2017

@@ -303,8 +303,12 @@ def _read_configuration_file(self, path):
should_inherit = True

if parser.read(path) and self._get_section_name(parser):
all_options = [o for o in self._parser.option_list]

This comment has been minimized.

@Nurdok

Nurdok Sep 22, 2017

Member

Can't this be just all_options = self_parser.option_list[:]?

This comment has been minimized.

@shacharoo

shacharoo Sep 22, 2017

Member

But mom, all the cool kids are doing it!

@Nurdok

Nurdok approved these changes Sep 23, 2017

@Nurdok Nurdok merged commit 4e5e488 into PyCQA:master Sep 23, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@shacharoo shacharoo deleted the shacharoo:better-help-section branch 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