tags:

views:

126

answers:

1

Following is from pylint docs:

--ignore=<file>
    Add <file or directory> to the black list. It should be a base name, not a path. You may set this option multiple times. [current: %default]

Yet I'm not having luck getting the directory part work.

I have directory called migrations, which has django-south migration files. As I enter --ignore=migrations it still keeps giving me the errors/warnings in files inside migrations directory.

Could it be that --ignore is not working for directories?

If I could even use regexp to match the ignored files it would work, since django-south files are all named 0001_something, 0002_something...


Since I could not get the ignore by directory to work I have resorted to simply putting # pylint: disable-msg-cat=WCREFI on top of each migration file, which ignores all pylint errors, warnings and infos.

A: 

You can then use Bash expansion to your advantage:

--ignore=migrations/{0000..1000}_something
badp
This will not work because of http://www.logilab.org/ticket/22273
badp
I think the ignore allowes only *basename*, so the `migrations/` would not work. Also I'm developing under Windows so I think Bash is out of question.
Ciantic