| Total Complexity | 1 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from dataclasses import dataclass |
||
| 2 | |||
| 3 | |||
| 4 | @dataclass |
||
| 5 | class Report: # pylint: disable=R0902 |
||
| 6 | title: str = "" |
||
| 7 | identity: str = "" |
||
| 8 | profile_name: str = "" |
||
| 9 | target: str = "" |
||
| 10 | cpe_platforms: str = "" |
||
| 11 | scanner: str = "" |
||
| 12 | scanner_version: str = "" |
||
| 13 | benchmark_url: str = "" |
||
| 14 | benchmark_id: str = "" |
||
| 15 | benchmark_version: str = "" |
||
| 16 | start_time: str = "" |
||
| 17 | end_time: str = "" |
||
| 18 | test_system: str = "" |
||
| 19 | score: float = 0.0 |
||
| 20 | score_max: float = 0.0 |
||
| 21 | |||
| 22 | def as_dict(self): |
||
| 23 | return { |
||
| 24 | "title": self.title, |
||
| 25 | "profile_name": self.profile_name, |
||
| 26 | "target": self.target, |
||
| 27 | "identit": self.identity, |
||
| 28 | "cpe_platforms": self.cpe_platforms, |
||
| 29 | "scanner": self.scanner, |
||
| 30 | "scanner_version": self.scanner_version, |
||
| 31 | "benchmark_url": self.benchmark_url, |
||
| 32 | "benchmark_id": self.benchmark_id, |
||
| 33 | "benchmark_version": self.benchmark_version, |
||
| 34 | "start_time": self.start_time, |
||
| 35 | "end_time": self.end_time, |
||
| 36 | "test_system": self.test_system, |
||
| 37 | "score": self.score, |
||
| 38 | "score_max": self.score_max, |
||
| 39 | } |
||
| 40 |