-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
-e/--exclude doesn't work with pre-commit #60
Comments
Seems like a reasonable expectation :) Thanks for the issue! I'll try to set some time aside over the next week to look deeper into this. |
Thanks a lot! I am a bit curious about why it doesn't work. One of my guesses is that I am pointed to a directory that doesn't exist given the working directory within pre-commit. But since For my use case, it isn't the most urgent since I can simply ignore test files/functions using a regex. |
Defining |
That's indeed why it's strange. I defined |
In case it's useful to you, as a stopgap solution, you could use pre-commit's own exclude:
|
My solution is adding - repo: https://github.com/econchick/interrogate
rev: 1.3.2
hooks:
- id: interrogate
args: [-vv, --config=pyproject.toml]
pass_filenames: false That way Maybe this should be part of the defaults for the hook? |
This saved me a LOT of pain. Thank you |
For me this is happening with every argument -i, -I, -m. Any of them work in pre-commit |
has this issue been fixed yet ? |
I also have an issue when I set this in my In my
Running However, in my If I provide:
|
Environment
interrogate
version: 1.3.1Description of the bug
Using the
-e/--exclude
argument works perfectly fine when usinginterrogate
directly on the command line. However, when I pass it in my.pre-commit-config.yaml
file like so:The argument doesn't seem to take effect. So far, I have resulted to using
--ignore-regex
which does work and achieves the same goal. Still, strange that--exclude
doesn't seem to work. Maybe I am doing something wrong?What you expected to happen
I expected
--exclude
to work using pre-commit.The text was updated successfully, but these errors were encountered: