Initialize a new virtual codebase from JSON scan file at `location`. See the Codebase parent class for other arguments. `max_depth`, if passed, will be ignored as VirtualCodebase will be using the depth of the original scan.
(
self,
location,
resource_attributes=None,
codebase_attributes=None,
temp_dir=temp_dir,
max_in_memory=10000,
paths=tuple(),
*args,
**kwargs,
)
| 1746 | ) |
| 1747 | |
| 1748 | def __init__( |
| 1749 | self, |
| 1750 | location, |
| 1751 | resource_attributes=None, |
| 1752 | codebase_attributes=None, |
| 1753 | temp_dir=temp_dir, |
| 1754 | max_in_memory=10000, |
| 1755 | paths=tuple(), |
| 1756 | *args, |
| 1757 | **kwargs, |
| 1758 | ): |
| 1759 | """ |
| 1760 | Initialize a new virtual codebase from JSON scan file at `location`. |
| 1761 | See the Codebase parent class for other arguments. |
| 1762 | |
| 1763 | `max_depth`, if passed, will be ignored as VirtualCodebase will |
| 1764 | be using the depth of the original scan. |
| 1765 | """ |
| 1766 | logger_debug(f"VirtualCodebase: new from: {location!r}") |
| 1767 | |
| 1768 | self._setup_essentials(temp_dir, max_in_memory) |
| 1769 | |
| 1770 | self.codebase_attributes = codebase_attributes or {} |
| 1771 | self.resource_attributes = resource_attributes or {} |
| 1772 | self.resource_class = None |
| 1773 | self.has_single_resource = False |
| 1774 | self.location = location |
| 1775 | |
| 1776 | scan_data = self._get_scan_data(location) |
| 1777 | self.paths = self._prepare_clean_paths(paths) |
| 1778 | self._populate(scan_data) |
| 1779 | |
| 1780 | def _get_scan_data_helper(self, location): |
| 1781 | """ |
nothing calls this directly
no test coverage detected