Consider the following dir structure: p/ __init__.py a.py # contains line : "class A(object): pass" s/ __init__.py # contains line "from ..a import A" When I open "p" directory as a project and then open s/__init__.py, the import of A is not recognized and problems window shows: Declaration for "__init__.A" not found in the specified module Obviously importing "p.s" from python and using "p.s.A" works. Reproducible: Always Steps to Reproduce: See details kdev-python version 1.4.2 on Kubuntu 13.04 64-bit
Yes, known issue, it's on the TODO list already.
Great. Looking forward to have it! :)
Created attachment 81589 [details] Patch to make relative imports work (for me) How about the attached patch? BTW, do you usually create unitests for this kind of stuff?
Git commit e1de00ab8d0544b846fc0b0de3e4a2648b47c13d by Sven Brauch, on behalf of Zaar Hai. Committed on 13/08/2013 at 10:27. Pushed by brauch into branch 'master'. Make relative imports work REVIEW:111928 CCMAIL:haizaar@haizaar.com M +13 -2 duchain/contextbuilder.cpp M +4 -1 duchain/declarationbuilder.cpp http://commits.kde.org/kdev-python/e1de00ab8d0544b846fc0b0de3e4a2648b47c13d