PackageData
Contains all data collected for a package.
Attributes:
| Name | Type | Description |
|---|---|---|
package_name |
str
|
The name of the package. |
modules |
dict[str, tuple[str, ModuleData]]
|
All modules and their ModuleData. The key is the name of the module. The value is a tuple of the path to the module and the ModuleData. |
combined_module |
ModuleData
|
The combined ModuleData of all modules in the package. |
Source code in src/library_analyzer/processing/api/purity_analysis/model/_module_data.py
combined_module: ModuleData | None = field(default=None)
class-attribute
instance-attribute
¶
modules: dict[str, tuple[str, ModuleData]] = field(default_factory=dict)
class-attribute
instance-attribute
¶
package_name: str
instance-attribute
¶
__init__(package_name, modules=dict(), combined_module=None)
¶
combine_modules()
¶
Combine the data of all modules into one ModuleData.
Combines the data of all modules in the package into one ModuleData. The scope of the new ModuleData is of type UnkownSymbol, and the children are the scopes of the modules. The classes, functions, and imports are combined into one dict each.
Returns:
| Type | Description |
|---|---|
ModuleData
|
The combined ModuleData. |