File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 3
3
4
4
from py2puml .domain .umlitem import UmlItem
5
5
6
+
6
7
@dataclass
7
8
class UmlAttribute :
8
9
name : str
@@ -11,7 +12,7 @@ class UmlAttribute:
11
12
12
13
13
14
@dataclass
14
- class UmlMethod ( object ) :
15
+ class UmlMethod :
15
16
name : str
16
17
signature : str
17
18
Original file line number Diff line number Diff line change 7
7
8
8
9
9
class Coordinates :
10
- def __init__ (self , x : float , y : float ):
10
+ def __init__ (self , x : float , y : float ) -> None :
11
11
self .x = x
12
12
self .y = y
13
13
@@ -17,13 +17,13 @@ class Point:
17
17
origin = Coordinates (0 , 0 )
18
18
19
19
@staticmethod
20
- def from_values (x : int , y : str , u : float ) -> 'Point' :
21
- return Point (x , y , u )
20
+ def from_values (x : int , y : str ) -> 'Point' :
21
+ return Point (x , y )
22
22
23
- def get_coordinates (self ):
23
+ def get_coordinates (self ) -> Tuple [ float , str ] :
24
24
return self .x , self .y
25
25
26
- def __init__ (self , x : int , y : str ):
26
+ def __init__ (self , x : int , y : str ) -> None :
27
27
self .coordinates : Coordinates = Coordinates (x , float (y ))
28
28
self .day_unit : withenum .TimeUnit = withenum .TimeUnit .DAYS
29
29
self .hour_unit : modules .withenum .TimeUnit = modules .withenum .TimeUnit .HOURS
Original file line number Diff line number Diff line change @@ -11,19 +11,20 @@ class tests.modules.withmethods.withmethods.Point {
11
11
time_resolution: Tuple[str, TimeUnit]
12
12
x : int
13
13
y : str
14
- from_values(x: int, y: str, u: float) -> 'Point'
15
- get_coordinates(self)
14
+ {static} Point from_values(x: int, y: str)
15
+ Tuple[float, str] get_coordinates(self)
16
+ __init __(self, x: int, y: str)
16
17
}
17
18
class tests.modules.withmethods.withinheritedmethods.ThreeDimensionalPoint {
18
19
z : float
19
- check_positive(self) -> bool
20
- from_values(x: int, y: str, u: float) -> 'Point'
21
- get_coordinates(self)
20
+ __init __(self, x: int, y: str, z: float)
22
21
move(self, offset: int)
22
+ bool check_positive(self)
23
23
}
24
24
class tests.modules.withmethods.withmethods.Coordinates {
25
25
x : float
26
26
y : float
27
+ __init __(self, x: float, y: float)
27
28
}
28
29
tests . modules . withmethods . withmethods . Point *-- tests . modules . withmethods . withmethods . Coordinates
29
30
tests . modules . withmethods . withmethods . Point <|-- tests . modules . withmethods . withinheritedmethods . ThreeDimensionalPoint
You can’t perform that action at this time.
0 commit comments