A story about trying to pylint all python files directly under the current directory. For those who may be worried about the same thing, we will provide a temporary solution.
The solution is below.
--First create an empty __init__.py
.
--When executing the command, specify the folder after going up one level with ..
. (I don't know the reason)
At first, the folder structure looks like this.
C:\Users\{username}\Desktop\project
└aaa.py
I tried the following from the command prompt.
(dev) C:\Users\{username}\Desktop\project>pylint *.py
************* Module *.py
*.py:1:0: F0001: No module named *.py (fatal)
that. .. .. Can't you use wildcards?
After researching various things, I felt that I could go if I made __init__.py
in the same hierarchy.
__init__.py
can be an empty file.
C:\Users\{username}\Desktop\project
├__init__.py
└aaa.py
Can this be done below?
(dev) C:\Users\{username}\Desktop\project>pylint .
(dev) C:\Users\{username}\Desktop\project>
This is also useless. .. .. Just in case, try it one level higher.
(dev) C:\Users\{username}\Desktop\project>cd ..
(dev) C:\Users\{username}\Desktop>pylint project
************* Module project.aaa.py
project\aaa.py:24:0: C0301: Line too long (109/100) (line-too-long)
(Many others)
-----------------------------------
Your code has been rated at 2.20/10
(dev) C:\Users\snkmr\Desktop\repo>
Oh, it's done! !! !! But it's too inconvenient to go up the hierarchy ... Maybe Wanchan can do this? ??
(dev) C:\Users\{username}\Desktop>cd project
(dev) C:\Users\{username}\Desktop\project>pylint ..\project
************* Module project.aaa.py
project\aaa.py:24:0: C0301: Line too long (109/100) (line-too-long)
(Many others)
-----------------------------------
Your code has been rated at 2.20/10
(dev) C:\Users\snkmr\Desktop\repo>
I was able to go! !! !! I don't know if this is the correct solution, but I solved it.
The solution is below.
--First create an empty __init__.py
.
--When executing the command, specify the folder after going up one level with ..
. (I don't know the reason)
Recommended Posts