Skip to content
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

Exclude Files in Test Modules from Numpydoc Validation #497

Open
RNKuhns opened this issue Aug 24, 2023 · 0 comments
Open

Exclude Files in Test Modules from Numpydoc Validation #497

RNKuhns opened this issue Aug 24, 2023 · 0 comments

Comments

@RNKuhns
Copy link

RNKuhns commented Aug 24, 2023

I love the ability to include the numpydoc validations in my pre-commit routine.

Sorry, I got busy and couldn't help with testing.

As I've been implementing the validations as a pre-commit routine I realized I'm having trouble coming up with a pattern to exclude my test files in the "exclude" option in my pyproject.toml.

I want to exclude any object in a "tests" directory from validation.

I've succeeded by doing this in the .pre-commit-config.yaml file (as shown below). But do you have any suggestions on how I get that to work in the pre-commit routine and specify it in the pyproject.toml configuration?

  - repo: https://github.com/numpy/numpydoc
    rev: v1.6.0rc2
    hooks:
      - id: numpydoc-validation
        exclude: |
          (?x)(
              /tests/|
              docs/source
          )
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