Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have installed pylint. But it doesn't display the statistics by type, raw metrics , duplication ,etc. tables. How do I get pylint display it?

Tags:

python

pylint

C:\Users\dominic.lopes\Desktop>pylint Exception.py ************* Module Exception Exception.py:1:0: C0103: Module name "Exception" doesn't conform to snake_case naming style (invalid-name) Exception.py:11:4: C0103: Constant name "x" doesn't conform to UPPER_CASE naming style (invalid-name) Exception.py:12:4: C0103: Constant name "y" doesn't conform to UPPER_CASE naming style (invalid-name) Exception.py:21:44: E0602: Undefined variable 'count' (undefined-variable)


Your code has been rated at 3.85/10 (previous run: 6.92/10, -3.08)

This is the error traceback i get

like image 564
Dominic Lopes Avatar asked Oct 25 '25 00:10

Dominic Lopes


2 Answers

If you are using a more recent version of pylint (that is, >1.7), you will need to pass either -ry or --reports=yes to pylint as in pylint <your file> --reports=yes. The report section is now disabled by default in more recent versions so you have to activate it manually.

like image 56
PCManticore Avatar answered Oct 27 '25 00:10

PCManticore


Faced the same issue. Just run the below command:

pylint -ry "fileName.py"

Note: Run this command at your file location.

like image 44
Md Nakibul Hassan Avatar answered Oct 26 '25 23:10

Md Nakibul Hassan