Feneric / doxypypy

A more Pythonic version of doxypy, a Doxygen filter for Python.
GNU General Public License v2.0
149 stars 49 forks source link

from import syntax #20

Closed Alcolo47 closed 9 years ago

Alcolo47 commented 9 years ago

My project:

A/__init.py
A/mod.py: def f(): pass
B/__init__.py
B/mod.py: def f(): pass

main.py:

from B.mod import f
def main():
    f()

doxygen see that main.main calls A.f()

There is a way to have a correct call graph ?

Note: doxygen dosen't understand the 1 line syntax:

def main(): f()
Feneric commented 9 years ago

I'd welcome a patch that doesn't break anything else, but I don't think this is an easy fix and it's one I won't be investigating. Making any language work with an automated documentation system is a "meet in the middle" situation between the tool and the programmer. The tool will make good faith efforts to parse everything properly and produce reasonable results, but the programmer also has to not go out of his or her way to make things obtuse. I suspect that most of the users of doxypypy aren't the sort of folks who'd be apt to use the single line syntax, and even if they were, it's a fairly simple process to either change the code or create another filter in series to address that one issue.

Alcolo47 commented 9 years ago

The main problem is not the single line syntax, it was just a remark. I'm writing the mod.py files like that only to post this issue, You can write them like you want.

The problem is that doxypypy doesn't associate the 'f' symbol to the correct function: B.f (doxypypy tells that main calls A.f)