logoalt Hacker News

yorwbatoday at 11:00 AM1 replyview on HN

Identifiers correspond to nodes and a mention of an identifier in the definition of another corresponds to a directed edge. The resulting graph won't necessarily be acyclic, but you can still use it to inform the order in which you present definitions, e.g. newspaper style starts with the most high-level function and puts the low-level details at the end: https://pypi.org/project/flake8-newspaper-style/


Replies

michalsustrtoday at 11:35 AM

Yes exactly! Good idea to extend it to functions as well