We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The scope naming internals of objects at the top level of a module seem to have changed somewhere between Python 3.4 and 3.6.
This code used to work in Python 3.4 (pyan/analyzer.py, method analyze_scopes):
pyan/analyzer.py
analyze_scopes
ns = "%s.%s" % (parent_ns, sc.name) if len(sc.name) else parent_ns
but in Python 3.6.8, I'm now getting names like ".some_top_level_object" (note silly leading dot).
".some_top_level_object"
Now parent_ns is empty, and the object name is returned in sc.name. It used to be the other way around.
parent_ns
sc.name
Seems this needs code to handle both cases...
The text was updated successfully, but these errors were encountered:
...or maybe it's the fact I'm now trying to analyze a nontrivial __init__.py? Debugging...
__init__.py
Sorry, something went wrong.
...which is in the cwd (see anutils.py, function get_module_name).
anutils.py
get_module_name
Yep, analyzing an __init__.py in cwd was the actual culprit.
a1b6dd7
Let's document also the fact that nontrivial here means that the __init__.py defines functions and/or classes, so something for Pyan to pick up.
No branches or pull requests
The scope naming internals of objects at the top level of a module seem to have changed somewhere between Python 3.4 and 3.6.
This code used to work in Python 3.4 (
pyan/analyzer.py
, methodanalyze_scopes
):but in Python 3.6.8, I'm now getting names like
".some_top_level_object"
(note silly leading dot).Now
parent_ns
is empty, and the object name is returned insc.name
. It used to be the other way around.Seems this needs code to handle both cases...
The text was updated successfully, but these errors were encountered: