Disclaimer: I've just started researching this area/domain of knowledge; so I have no idea what exactly it's called; but through a google search, I believe it has to do with (static code analysis, or at least it's related to it).
My question is: Given a python code - file - script - module - package. Is there a tool that can produce a report out of it detailing: how many classes are used, functions, built-in functions; decorators ;if/for/while statements etc?
To give you an analogy most of us can relate to: Given a text file: find all the verbs / nouns / adjectives / adverbs / proper noun. NLP tools like spaCy or NLTK have the ability to do that for natural languages.
But what about programming languages? Is there a tool for that? Can a tool like pylint do that?
UPDATE
As I expected such tools exist; one of them as @BoarGules suggested in his comment is the ast module ... It's the hint I needed to go further in my research; any further suggestions are welcome. BTW ast stands for abstract syntax tree.