File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 9
9
},
10
10
{
11
11
"cell_type" : " code" ,
12
- "execution_count" : 6 ,
12
+ "execution_count" : 3 ,
13
13
"metadata" : {},
14
14
"outputs" : [],
15
15
"source" : [
26
26
},
27
27
{
28
28
"cell_type" : " code" ,
29
- "execution_count" : 7 ,
29
+ "execution_count" : 4 ,
30
30
"metadata" : {},
31
31
"outputs" : [
32
32
{
71
71
},
72
72
{
73
73
"cell_type" : " code" ,
74
- "execution_count" : 11 ,
74
+ "execution_count" : 9 ,
75
75
"metadata" : {},
76
76
"outputs" : [
77
77
{
87
87
" \"\"\" Abstract base class representing a vehicle.\"\"\"\n " ,
88
88
" \n " ,
89
89
" @property\n " ,
90
- " def max_speed(self) -> float | None:\n " ,
90
+ " @abstractmethod\n " ,
91
+ " def max_speed(self) -> float:\n " ,
91
92
" \"\"\" Maximum speed of the vehicle.\"\"\"\n " ,
92
93
" pass\n " ,
93
94
" \n " ,
96
97
" \"\"\" Class representing a car.\"\"\"\n " ,
97
98
" \n " ,
98
99
" def __init__(self, max_speed: float) -> None:\n " ,
100
+ " \"\"\" Initialize a car with a given maximum speed.\"\"\"\n " ,
99
101
" self._max_speed = max_speed\n " ,
100
102
" \n " ,
101
103
" @property\n " ,
102
104
" def max_speed(self) -> float:\n " ,
105
+ " \"\"\" Return the maximum speed of the car.\"\"\"\n " ,
103
106
" return self._max_speed\n " ,
104
107
" \n " ,
105
108
" \n " ,
116
119
},
117
120
{
118
121
"cell_type" : " code" ,
119
- "execution_count" : 9 ,
122
+ "execution_count" : 6 ,
120
123
"metadata" : {},
121
124
"outputs" : [
122
125
{
163
166
},
164
167
{
165
168
"cell_type" : " code" ,
166
- "execution_count" : 10 ,
169
+ "execution_count" : 7 ,
167
170
"metadata" : {},
168
171
"outputs" : [
169
172
{
You can’t perform that action at this time.
0 commit comments