Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot have a file called “Graph.py” that has module level call to a known function #91

Open
AntonObersteiner opened this issue Sep 30, 2023 · 1 comment

Comments

@AntonObersteiner
Copy link

to reproduce: create a file Graph.py with these two lines:

#file Graph.py
def a(): pass
a()

run:

pyan3 --dot Graph.py > graph.dot

this will generate a graph.dot file that contains Graph -> which is invalid.

@AntonObersteiner
Copy link
Author

I don’t really know how to solve this. If dot files don’t support some kind of escaping or marking of non-interpreted strings, one could rename the module internally, so the output svg or html just says Graph_ instead or at least give a concise error message whenever a invalid name will appear in the dot string. Then the user can exclude the offending file or remove the calls from the module level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant