fix: Add config to report object (#588)

This commit is contained in:
Jim Brännlund 2023-03-19 18:42:45 +01:00 committed by GitHub
parent d02dac0dda
commit 21cf38918f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -45,7 +45,8 @@ class BaseReport:
self._html[index] = html
class Report:
def __init__(self, title):
def __init__(self, title, config):
self._config = config
self._data = {
"title": title,
"collectedItems": 0,
@ -56,6 +57,10 @@ class BaseReport:
"additionalSummary": defaultdict(list),
}
@property
def config(self):
return self._config
@property
def data(self):
return self._data
@ -86,7 +91,8 @@ class BaseReport:
self._max_asset_filename_length = int(
config.getini("max_asset_filename_length")
)
self._report = self.Report(self._report_path.name)
self._report = self.Report(self._report_path.name, config)
@property
def css(self):