5.3.5. Python Model

Sonargraph parses the Python source files of your project and all directly and indirectly included files from the Python library and other third party libraries used by your software system. Since namespaces in Python work quite differently compared to the other languages supported by Sonargraph we decided that Python modules are considered as namespaces/packages in the logical model. So in the namespace view your Python modules (i.e. source files) will show up as packages.

For the cycle analyzer that means that Python modules play a double role as "components" and as packages at the same time. So package cycles can actually contain single Python modules.

When it comes to analyzing dependencies with respect to calling a method of a class that can only be resolved if the class of the receiver is known at compile time, which usually is only true for calls on "self" and if type hints are available.