Uh oh!
There was an error while loading. Please reload this page.
allow turning on run tracing from the command line - #623
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
asottile
commented
Mar 23, 2021
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). |
asottile
commented
Mar 23, 2021
A debugger maybe? |
terencehonles
commented
Mar 23, 2021
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: