Total Complexity | 7 |
Total Lines | 41 |
Duplicated Lines | 60.98 % |
Changes | 0 |
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 | # File auto-generated against equivalent DynamicSerialize Java class |
||
2 | # and then modified post-generation to make it sub class |
||
3 | # AbstractDataAccessRequest. |
||
4 | # |
||
5 | # SOFTWARE HISTORY |
||
6 | # |
||
7 | # Date Ticket# Engineer Description |
||
8 | # ------------ ---------- ----------- -------------------------- |
||
9 | # 05/28/13 #2023 dgilling Initial Creation. |
||
10 | # 10/14/18 mjames@ucar Set/get methods for envelope |
||
11 | # |
||
12 | |||
13 | from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractDataAccessRequest |
||
|
|||
14 | |||
15 | |||
16 | View Code Duplication | class GetGeometryDataRequest(AbstractDataAccessRequest): |
|
17 | |||
18 | def __init__(self): |
||
19 | super(GetGeometryDataRequest, self).__init__() |
||
20 | self.requestedTimes = None |
||
21 | self.requestedPeriod = None |
||
22 | self.envelope = None |
||
23 | |||
24 | def getEnvelope(self): |
||
25 | return self.envelope |
||
26 | |||
27 | def setEnvelope(self, envelope): |
||
28 | self.envelope = envelope |
||
29 | |||
30 | def getRequestedTimes(self): |
||
31 | return self.requestedTimes |
||
32 | |||
33 | def setRequestedTimes(self, requestedTimes): |
||
34 | self.requestedTimes = requestedTimes |
||
35 | |||
36 | def getRequestedPeriod(self): |
||
37 | return self.requestedPeriod |
||
38 | |||
39 | def setRequestedPeriod(self, requestedPeriod): |
||
40 | self.requestedPeriod = requestedPeriod |
||
41 | |||
42 |
This check looks for lines that are too long. You can specify the maximum line length.