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

Wildcard ignore #72

Closed
hashar opened this Issue Jun 14, 2014 · 6 comments

Comments

Projects
5 participants
@hashar
Copy link

hashar commented Jun 14, 2014

flake8 and pep8 interprets values passed to 'ignore' as prefix to ignore. So one can:

pep8 --ignore=W

That will ignore any pep8 ignore.

I wanted to have pep257 to ignore any missing docstrings (D10{1,2,3,4}) by using:

pep257 --ignore=D10

But that would only ignore D10 errors and let D101 and others flow in.

pep8 handles it via startswith():

 def ignore_code(self, code)
 "check if code should be ignored"
    return (code.startswith(self.options.ignore) and
        not code.startswith(self.options.select))
@sigmavirus24

This comment has been minimized.

Copy link
Member

sigmavirus24 commented Jun 16, 2014

If you use the flake8-docstrings plugin, you may get this for free. (flake8-docstrings adds PEP257 to the list of checkers run by flake8.)

@hashar

This comment has been minimized.

Copy link

hashar commented Jun 18, 2014

I am using flake8-docstrings which indeeds support:

flake8 --ignore=D10

It would be rather nice to have the same functionality supported directly in pep257 though :)

@sigmavirus24

This comment has been minimized.

Copy link
Member

sigmavirus24 commented Jun 19, 2014

@hashar I'm not convinced pep257 needs it directly but I'm also not a core developer/maintainer so feel free to leave this open. :)

@shacharoo

This comment has been minimized.

Copy link
Member

shacharoo commented Oct 9, 2015

In my opinion it should be done explicitly, maybe with an asterisk? something like --ignore=D10*?

@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Sep 29, 2016

I think we should support an API similar to pep8 / flake8.

@varunagrawal

This comment has been minimized.

Copy link
Contributor

varunagrawal commented Oct 10, 2016

Addressed in #212

@Nurdok Nurdok closed this Dec 3, 2016

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