@@ -1202,62 +1202,25 @@ class Assign(_base_nodes.AssignTypeNode, _base_nodes.Statement):
1202
1202
<Assign l.1 at 0x7effe1db8550>
1203
1203
"""
1204
1204
1205
- _astroid_fields = ("targets" , "value" )
1206
- _other_other_fields = ("type_annotation" ,)
1207
-
1208
- def __init__ (
1209
- self ,
1210
- lineno : int | None = None ,
1211
- col_offset : int | None = None ,
1212
- parent : NodeNG | None = None ,
1213
- * ,
1214
- end_lineno : int | None = None ,
1215
- end_col_offset : int | None = None ,
1216
- ) -> None :
1217
- """
1218
- :param lineno: The line that this node appears on in the source code.
1219
-
1220
- :param col_offset: The column that this node appears on in the
1221
- source code.
1222
-
1223
- :param parent: The parent node in the syntax tree.
1224
-
1225
- :param end_lineno: The last line this node appears on in the source code.
1226
-
1227
- :param end_col_offset: The end column this node appears on in the
1228
- source code. Note: This is after the last symbol.
1229
- """
1230
- self .targets : list [NodeNG ] = []
1231
- """What is being assigned to."""
1205
+ targets : list [NodeNG ]
1206
+ """What is being assigned to."""
1232
1207
1233
- self . value : NodeNG | None = None
1234
- """The value being assigned to the variables."""
1208
+ value : NodeNG
1209
+ """The value being assigned to the variables."""
1235
1210
1236
- self . type_annotation : NodeNG | None = None # can be None
1237
- """If present, this will contain the type annotation passed by a type comment"""
1211
+ type_annotation : NodeNG | None
1212
+ """If present, this will contain the type annotation passed by a type comment"""
1238
1213
1239
- super ().__init__ (
1240
- lineno = lineno ,
1241
- col_offset = col_offset ,
1242
- end_lineno = end_lineno ,
1243
- end_col_offset = end_col_offset ,
1244
- parent = parent ,
1245
- )
1214
+ _astroid_fields = ("targets" , "value" )
1215
+ _other_other_fields = ("type_annotation" ,)
1246
1216
1247
1217
def postinit (
1248
1218
self ,
1249
- targets : list [NodeNG ] | None = None ,
1250
- value : NodeNG | None = None ,
1219
+ targets : list [NodeNG ],
1220
+ value : NodeNG ,
1251
1221
type_annotation : NodeNG | None = None ,
1252
1222
) -> None :
1253
- """Do some setup after initialisation.
1254
-
1255
- :param targets: What is being assigned to.
1256
- :param value: The value being assigned to the variables.
1257
- :param type_annotation:
1258
- """
1259
- if targets is not None :
1260
- self .targets = targets
1223
+ self .targets = targets
1261
1224
self .value = value
1262
1225
self .type_annotation = type_annotation
1263
1226
0 commit comments