Passed
Pull Request — main (#129)
by Jan
06:52
created

openscap_report.scap_results_parser.data_structures.warning   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 13
rs 10
c 0
b 0
f 0
ccs 6
cts 7
cp 0.8571
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A RuleWarning.as_dict() 0 2 1
1
# Copyright 2022, Red Hat, Inc.
2
# SPDX-License-Identifier: LGPL-2.1-or-later
3 1
from dataclasses import asdict, dataclass
4
5
6 1
@dataclass
7 1
class RuleWarning:
8 1
    text: str
9 1
    category: str = ""
10
11 1
    def as_dict(self):
12
        return asdict(self)
13