-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folder analysis fails if '__init__.py' is not present #2108
Comments
@PCManticore Isn't that different though? In Python3.3+ directories don't need init.py to be considered packages. Can't pylint do the same (i.e. not fail when there is no init.py but consider the directory a package)? |
@sztomi The specific example I used for this issue was a root project folder, not a package folder. I have not tested what will happen if pylint analyzes a package directory without an |
So what's the status of this issue? I can't run pylint at my project's root and I don't understand why that's not supported. |
I'm also interested in a workaround for this using the pylint module. Is there a way to stop getting this error when using |
I also have this issue, with very similar initial parameters. Is there any plan to fix this? |
Work usually well, but fails if |
If anyone ends up here like I have: I found that |
When analyzing a folder, Pylint will fail with "No such file or directory" (
parse-error
) if the folder does not contain an__init__.py
file.Ironically, this means Pylint will fail if you try to analyze the Pylint repository.
Steps to reproduce
Create a project with the following folder structure
Analyze the folder with Pylint
Current behavior
Folder analysis will fail.
Expected behavior
Pylint should analyze all files in the folder without raising an error.
pylint --version output
Extra information
This issue is likely related to #842. It appears this issue was fixed when analyzing individual files, but is still present when analyzing folders.
__init__.py
was made optional in Python 3.3.The text was updated successfully, but these errors were encountered: