I have coding rules that require me to annotate exceptions to rules
for PyLint, but occasionally it happens that I find PyLint rules disabled
that would no longer be necessary.
Is there a way or script, or anything to detect these automatically? I
was thinking of writing something that removes PyLint disablers one
by one, and checks if that doesn't generate PyLint warnings, and
warn about those. Didn't do it so far, but I feel tempted to do this
However, to PyLint, this might be way more easier to implement, and
maybe it was done. I cannot find anything in the manpage though.
Hi there the makers of Pylint,
has anyone ever thought about suggesting in the Pylint docs to place
configuration options in a Python project's `setup.cfg` file?
The interesting thing is that when you do a web search for "flake8 pylint
comparison" the opinions you find are somewhat, "flake8 and pylint are
complimentary tools [...] pylint is harder to configure".
So, yes, a bit more complex to configure. But after all the active
configuration can be generated, and it looks like all options can easily be
put into one of the standard places, such as `setup.cfg`. I've put all my
flake8 configuration (3 lines, really) and some additional pylint-specific
options into the setup.cfg file in my project , and ran pylint with it
$ pylint --rcfile=setup.cfg organice
If now, by magic, pylint would look for a setup.cfg file automatically
(maybe in the second place, after not finding the default resource file)
the command line would be reduced to "pylint <module>". Wouldn't that be
What do you think? Would you accept an appropriate pull request on the docs
in the first place?
BTW, I found issue #121 on Bitbucket with the latest comment saying just
about the same in just one sentence:
I downloaded flake8 from gitlab and ifound it as a very useful tool to
ensure code quality.
Was wondering it was possible to integrate clone digger (
http://clonedigger.sourceforge.net/) into flake8.
I'm having some trouble with flake8 when it's invoked from another
process, such as in vim. Sometimes its output goes missing - I just
get back an empty string. The problem vanishes if I
PYTHONUNBUFFERED=1, so I suspect it is related to how flake8 creates
multiple processes. I looked through the code and could see that it
creates multiprocessing sub-processes with daemon=True. Since these
sub-processes perform output on stdout, I believe they need to flush
it before telling the main thread that they are done, otherwise there
is a risk their output will be lost entirely if they are terminated
when the main process exits.
I find my problem goes away if I add "sys.stdout.flush()" to the
finally block in reporter.py's process_main(). I think this is a good
thing to do for the reason I described above.
However, I'm not *entirely* sure I understand what's going on. Every
single time I run flake8 from the command-line, all its output appears
as normal. So while there's a theoretical possibility that output
buffers might not be flushed, that doesn't actually seem to be what's
happening here. My suspicion was that the parent process was exiting
first, then the calling process (vim using the system() function) saw
it had exited and stopped reading its output, then the child process
flushed its output, but it was too late. That would explain why output
appears on the command-line, but is sometimes missed by vim. But I
can't actually figure out a way for this to happen. The parent process
should always terminate its daemon children as part of its exit
handler. So as far as I can tell they should all be dead by the time
it exits, and either they have flushed or their output is lost.
I posted about my problems on the Syntastic google group. You can find
a bit more detail about my original problem and what I tried there:
Does anyone better understand what might be going on here?
Hi Code Quality
This may already be a reported bug, but then i need help in finding that
I invoke pylint with :
from pylint.lint import Run
files = [ 'subdir/a.py', 'b.py' ]
for file in files:
status = Run(['-E'] +
['--rcfile', 'pylintrc'] +
## To keep separate records of each file
both files have this import
It runs well because the module config is in the sys.path when run.
But pylint reports for subdir/a.py AND b.py
E: 16,0: No name 'tc' in module 'config'
If I revers the order of the files pylint reports OK for BOTH, probably
because config.tc matches the path from root directory of b.py, and then
when I check subdir/a.py, pylint somehow have a memory of the import.
Run totally separately, only subdir/a.py reports problem with the import of
I don't want the order of the files to matter due to that pylint keeps a
memory of the previous files imports and search paths. How do I clean out
the imports between the files?
System Tester and python coder
I will be writing a new parser for Jedi. This is necessary for a quite a
few reasons described in:
I'm posting this here, because some of you may be interested in actually
using the new parser. It's going to be pure Python and contrary to the
Python's internal parser will have error recovery and indent positions.
If you're interested, I'd be really glad to hear your feedback!