Passed
Branch master (0fb205)
by Oleksandr
03:17
created

commons.spatial.Point2D.__repr__()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nop 1
crap 2
1 1
from .structures import BaseStructure
2
3
4 1
class Point2D(BaseStructure):
5 1
  __slots__ = ['x', 'y', ]
6
7 1
  def __init__(self, x, y):
8 1
    self.x = float(x)
9 1
    self.y = float(y)
10
11
  def __repr__(self):
12
    return "<Point2D '{0};{1}'>".format(self.x, self.y)
13
14
15 1
class Point3D(BaseStructure):
16 1
  __slots__ = ['x', 'y', 'z', ]
17
18 1
  def __init__(self, x, y, z):
19 1
    self.x = float(x)
20 1
    self.y = float(y)
21 1
    self.z = float(z)
22
23
  def __repr__(self):
24
    return "<Point3D '{0};{1};{2}'>".format(self.x, self.y, self.z)
25