Pylint does not find relative imports



With Cloud9, Pylint is unable to find relative imports.

If I run Pylint by myself, it works:

fnkr:~/workspace $ pylint -r n app/user/ 
No config file found, using default configuration
************* Module models
C:  1, 0: Missing module docstring (missing-docstring)
C:  1, 0: Missing class docstring (missing-docstring)
C:  1, 0: Old-style class defined. (old-style-class)
W:  1, 0: Class has no __init__ method (no-init)
R:  1, 0: Too few public methods (0/2) (too-few-public-methods)

Here is a sample workspace:
Workspace as zip:


Thanks for reporting. We’ll have a look!


@fnkr we investigated this issue. It appears Pylint has issues linting unsaved files when it comes to relative imports. We’re currently working with temporary files as it doesn’t support stdin, but Pylint has an issue with relative imports if the temporary file is hidden or in a different directory. Right now we disabled the import errors as they’re not helpful like this, but we hope to come to a different solution.


@lennartcl You could try this: