Passed
Pull Request — master (#93)
by Jan
13:35 queued 07:46
created

openscap_report.report_generators.json   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 6
cts 9
cp 0.6667
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A JSONReportGenerator.generate_report() 0 3 1
A JSONReportGenerator.__init__() 0 2 1
1
# Copyright 2022, Red Hat, Inc.
2
# SPDX-License-Identifier: LGPL-2.1-or-later
3 1
import logging
4 1
from io import BytesIO
5
6 1
from .report_generator import ReportGenerator
7
8
9 1
class JSONReportGenerator(ReportGenerator):
10 1
    def __init__(self, parser):  # pylint: disable=W0231
11
        self.report = parser.parse_report()
12
13 1
    def generate_report(self, debug_setting):
14
        logging.fatal("JSON Format is not implemented!")
15
        return BytesIO("{}".encode())
16