reports.fddtenantfault   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 72.22 %

Importance

Changes 0
Metric Value
eloc 14
dl 13
loc 18
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A Reporting.__init__() 3 3 1
A Reporting.on_options() 3 3 1
A Reporting.on_get() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
import falcon
2
import simplejson as json
3
4
5 View Code Duplication
class Reporting:
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6
    @staticmethod
7
    def __init__():
8
        pass
9
10
    @staticmethod
11
    def on_options(req, resp):
12
        resp.status = falcon.HTTP_200
13
14
    @staticmethod
15
    def on_get(req, resp):
16
        result = {}
17
        resp.body = json.dumps(result)
18