openscap_report.scap_results_parser.data_structures.reference   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
wmc 1
eloc 14
dl 0
loc 23
ccs 9
cts 10
cp 0.9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A Reference.as_dict() 0 2 1
1
# Copyright 2022, Red Hat, Inc.
2
# SPDX-License-Identifier: LGPL-2.1-or-later
3
4 1
from typing import List
5
6 1
from openscap_report.dataclasses import asdict, dataclass
7
8 1
REFERENCE_JSON_KEYS = [
9
    "name",
10
    "href",
11
    "ref_ids",
12
]
13
14
15 1
@dataclass
16 1
class Reference:
17 1
    name: str
18 1
    href: str
19 1
    ref_ids: List[str]
20
21 1
    def as_dict(self):
22
        return asdict(self)
23