allow turning on run tracing from the command line#623
allow turning on run tracing from the command line#623terencehonles wants to merge 1 commit intoPyCQA:masterfrom
Conversation
sigmavirus24
left a comment
There was a problem hiding this comment.
This project doesn't use flags purposefully. Further astpretty does what you're asking very well already
|
agreed, pyflakes doesn't have any flags currently and there's better tools for visualizing the ast |
But this is not only about tracing the ast, this is about inspecting pyflake's internal state. Is there a better tool for this currently? If you think the tracing should be limited to printing scope information I could change that, but I opened this PR in order to figure out if tracing might be helpful and if I should spend any more time on this. (Which currently it looks like no). |
A debugger maybe? |
|
Ok, I guess I'm glad I didn't try working on making the tracing more useful. |
This along with some additional tracing output was used to help with #622.
In the additional changes I added the tracing to also print out the stack information when popping the stack. Eventually I added some more context to which stack was being printed and while I shimmed the information in via
def popStack(self, node=None)to optionally provide node information for name and file/line context. I was wondering if it would be OK if I were to add a node to each stack created instead of trying to "merge" them via the checker.For the stack information I printed out if the name was used and if it was available for runtime usage. An example of this would be the following: