Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable "Using config file" in pylint

Tags:

python

pylint

I'm running pylint for several directories using a simple bash script:

#!/usr/bin/env bash

set -e

for PACKAGE in some_dir another_dir third_dir
do
    pylint --disable=R,C $PACKAGE
done

I want output to be clean if everything is fine. However, there are annoying lines:

Using config file /home/user/projects/some-project/.pylintrc

Is there an option in pylintrc or in pylint command line to disable "Using config file"?

Update: there is an open issue https://github.com/PyCQA/pylint/issues/1853

like image 673
alexanderlukanin13 Avatar asked Oct 27 '25 06:10

alexanderlukanin13


1 Answers

@Jan Jurec answer is outdated, in a posterior commit, they renamed the quiet command flag to --verbose. Now on, pylint is "quiet" by default.

However, it still not quiet enough, as by default it prints the scores like this:

D:\tests>pylint --disable=I,E,R,W,C,F --enable=E0102 --reports=no test.py

---------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: -2.50/10, +12.50)


D:\tests>

But you disable those with -sn, then the older example would became this when no problems are found:

D:\tests>pylint --disable=I,E,R,W,C,F --enable=E0102 --reports=no -sn test.py
D:\tests>

And if some problem is found, the output would be like this:

D:\tests>pylint --disable=I,E,R,W,C,F --enable=E0102 --reports=no -sn test.py
************* Module test
test.py:6:0: E0102: class already defined line 3 (function-redefined)
D:\tests>

Instead of this default:

D:\tests>pylint --disable=I,E,R,W,C,F --enable=E0102 --reports=no test.py
************* Module test
test.py:6:0: E0102: class already defined line 3 (function-redefined)

---------------------------------------------------------------------
Your code has been rated at -2.50/10 (previous run: 10.00/10, -12.50)


D:\tests>

References

  1. pylint: error: no such option: --quiet
  2. Still not quiet enough
like image 110
user Avatar answered Oct 28 '25 19:10

user