@@ -13,16 +13,28 @@ class ObjectReference(BaseModel):
13
13
# TRAITS
14
14
class InfraErrorTrait (BaseModel ):
15
15
is_warning : Literal [False ] = Field (default = False )
16
- obj_id : str = Field (description = "Identifier of the object that caused the error" , max_length = 255 )
17
- obj_type : str = Field (description = "Type of the object that caused the error" , max_length = 32 )
18
- field : str = Field (description = "Field of the object that caused the error" , max_length = 255 )
16
+ obj_id : str = Field (
17
+ description = "Identifier of the object that caused the error" , max_length = 255
18
+ )
19
+ obj_type : str = Field (
20
+ description = "Type of the object that caused the error" , max_length = 32
21
+ )
22
+ field : str = Field (
23
+ description = "Field of the object that caused the error" , max_length = 255
24
+ )
19
25
20
26
21
27
class InfraWarningTrait (BaseModel ):
22
28
is_warning : Literal [True ] = Field (default = True )
23
- obj_id : str = Field (description = "Identifier of the object that caused the warning" , max_length = 255 )
24
- obj_type : str = Field (description = "Type of the object that caused the warning" , max_length = 32 )
25
- field : str = Field (description = "Field of the object that caused the warning" , max_length = 255 )
29
+ obj_id : str = Field (
30
+ description = "Identifier of the object that caused the warning" , max_length = 255
31
+ )
32
+ obj_type : str = Field (
33
+ description = "Type of the object that caused the warning" , max_length = 32
34
+ )
35
+ field : str = Field (
36
+ description = "Field of the object that caused the warning" , max_length = 255
37
+ )
26
38
27
39
28
40
# Errors
@@ -53,7 +65,9 @@ class InvalidRoute(InfraErrorTrait):
53
65
54
66
55
67
class NodeEndpointsNotUnique (InfraErrorTrait ):
56
- error_type : Literal ["node_endpoints_not_unique" ] = Field (default = "node_endpoints_not_unique" )
68
+ error_type : Literal ["node_endpoints_not_unique" ] = Field (
69
+ default = "node_endpoints_not_unique"
70
+ )
57
71
58
72
59
73
class UnknownPortName (InfraErrorTrait ):
@@ -94,16 +108,22 @@ class MissingBufferStop(InfraWarningTrait):
94
108
95
109
96
110
class OddBufferStopLocation (InfraWarningTrait ):
97
- error_type : Literal ["odd_buffer_stop_location" ] = Field (default = "odd_buffer_stop_location" )
111
+ error_type : Literal ["odd_buffer_stop_location" ] = Field (
112
+ default = "odd_buffer_stop_location"
113
+ )
98
114
99
115
100
116
class OverlappingSpeedSections (InfraWarningTrait ):
101
- error_type : Literal ["overlapping_speed_sections" ] = Field (default = "overlapping_speed_sections" )
117
+ error_type : Literal ["overlapping_speed_sections" ] = Field (
118
+ default = "overlapping_speed_sections"
119
+ )
102
120
reference : ObjectReference
103
121
104
122
105
123
class OverlappingElectrifications (InfraWarningTrait ):
106
- error_type : Literal ["overlapping_electrifications" ] = Field (default = "overlapping_electrifications" )
124
+ error_type : Literal ["overlapping_electrifications" ] = Field (
125
+ default = "overlapping_electrifications"
126
+ )
107
127
reference : ObjectReference
108
128
109
129
0 commit comments