Hi Bill,
That error is probably generated on
com.python.pydev.analysis.visitors.ImportChecker (finding references of
org.python.pydev.ast.analysis.IAnalysisPreferences.TYPE_UNRESOLVED_IMPORT
may also give you good hints on related places).
Related tests are in com.python.pydev.analysis.OccurrencesAnalyzerTest.
Related to the place where relative imports are currently handled, you can
look for references of the attribute
"org.python.pydev.parser.jython.ast.ImportFrom.level".
As a note, this is probably some issue in the type inference engine not
resolving properly on one of those locations (unfortunately this code is
more complex than I'd like and does many things -- it was initially
engineered for getting code-completion fast and was later used for code
analysis and anything else which requires a type to be known, so, feel free
to reach out if you hit a wall somewhere...).
Also, as it's a bit complex, I definitely recommend starting with a test
case which reproduces your error and making sure that you can run the
OccurrencesAnalyzerTest properly before starting (you have to edit the
proper
pydev\plugins\org.python.pydev.core\tests\org\python\pydev\core\TestDependent.<os>.properties
for it to run in your system -- after that a run as > junit test should
work) -- I just committed some fixes in master for unittests, so,
synchronizing may be good.
A template for the test may be
com.python.pydev.analysis.OccurrencesAnalyzerTest.testImportSelf() (which
creates a test which relies on the filesystem hierarchy).
Cheers,
Fabio
On Sat, Oct 6, 2018 at 10:28 AM Bill Trautman <lha...@gm...> wrote:
> I wanted to have a look and see if I could resolve a reported issue and
> one I have seen with relative imports not being resolved and reported as an
> error.
>
> I have forked, cloned and loaded the plugins into Eclipse but could use a
> pointer to correct plugin/package to find that functionality.
>
>
> _______________________________________________
> pydev-code mailing list
> pyd...@li...
> https://lists.sourceforge.net/lists/listinfo/pydev-code
>
|