| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 87.5% |
| Changes | 0 | ||
| 1 | # Copyright 2022, Red Hat, Inc. |
||
| 2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
||
| 3 | 1 | from dataclasses import asdict, dataclass |
|
| 4 | |||
| 5 | 1 | WARNING_JSON_KEYS = [ |
|
| 6 | "text", |
||
| 7 | "category", |
||
| 8 | ] |
||
| 9 | |||
| 10 | |||
| 11 | 1 | @dataclass |
|
| 12 | 1 | class RuleWarning: |
|
| 13 | 1 | text: str |
|
| 14 | 1 | category: str = "" |
|
| 15 | |||
| 16 | 1 | def as_dict(self): |
|
| 17 | return asdict(self) |
||
| 18 |