Menu

#342 relative import of * does not work

open
nobody
5
2011-05-31
2011-05-31
No

Tested on 3.0.1

A relative import like:
from .foo import *

is not parsed correctly.

epydoc epydoc_test_relative/a
+-------------------------------------------------------------------------------------------------------
| In /home/alex/tmp/epydoc_test_relative/a/bar.py:
| Source code parsing failed (but introspection was successful).
| Error: Error during parsing: invalid syntax (/home/alex/tmp/epydoc_test_relative/a/bar.py, line 2)
| -- Bad dotted name

With the attached patch it does parse correctly.

Discussion

  • Alex Zbyslaw

    Alex Zbyslaw - 2011-05-31

    Patch to docparser.py

     
  • Alex Zbyslaw

    Alex Zbyslaw - 2011-05-31

    Shell script to demonstrate problem / test patch

     
  • Johannes Dewender

    I will include your patch in my maintenance fork epydoc-m:
    https://github.com/JonnyJD/epydoc-m/pull/6

    I still have to test it a bit and I don't have a release yet.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.