pylint raises error if directory doesn’t contain __init__.py file

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G65

$ pylint --version
pylint 2.1.1
astroid 2.0.3
Python 3.7.0 (default, Jul 23 2018, 20:22:55) 
[Clang 9.1.0 (clang-902.0.39.2)]

Update

I got this to work by trying:

$ cd /app
$ pylint *.py

or try:

$ pylint /path/to/app/*.py

and got the whole thing working.

...
Report
======
************* Module <yourmodname>
...
X statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
...

Error

I had tried to do:

$ pylint .
************* Module .
__init__.py:1:0: F0010: error while code parsing: Unable to load file 
__init__.py:
[Errno 2] No such file or directory: '__init__.py' (parse-error)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)