@@ -2661,12 +2661,6 @@ def __init__(
2661
2661
self .orelse : typing .List [NodeNG ] = []
2662
2662
"""The contents of the ``else`` block of the loop."""
2663
2663
2664
- self .orelse_lineno : Optional [int ] = None
2665
- """The line number of the ``else`` keyword."""
2666
-
2667
- self .orelse_col_offset : Optional [int ] = None
2668
- """The column offset of the ``else`` keyword."""
2669
-
2670
2664
self .type_annotation : Optional [NodeNG ] = None # can be None
2671
2665
"""If present, this will contain the type annotation passed by a type comment"""
2672
2666
@@ -2686,9 +2680,6 @@ def postinit(
2686
2680
body : Optional [typing .List [NodeNG ]] = None ,
2687
2681
orelse : Optional [typing .List [NodeNG ]] = None ,
2688
2682
type_annotation : Optional [NodeNG ] = None ,
2689
- * ,
2690
- orelse_lineno : Optional [int ] = None ,
2691
- orelse_col_offset : Optional [int ] = None ,
2692
2683
) -> None :
2693
2684
"""Do some setup after initialisation.
2694
2685
@@ -2699,19 +2690,13 @@ def postinit(
2699
2690
:param body: The contents of the body of the loop.
2700
2691
2701
2692
:param orelse: The contents of the ``else`` block of the loop.
2702
-
2703
- :param orelse_lineno: The line number of the ``else`` keyword.
2704
-
2705
- :param orelse_lineno: The column offset of the ``else`` keyword.
2706
2693
"""
2707
2694
self .target = target
2708
2695
self .iter = iter
2709
2696
if body is not None :
2710
2697
self .body = body
2711
2698
if orelse is not None :
2712
2699
self .orelse = orelse
2713
- self .orelse_lineno = orelse_lineno
2714
- self .orelse_col_offset = orelse_col_offset
2715
2700
self .type_annotation = type_annotation
2716
2701
2717
2702
assigned_stmts : ClassVar [AssignedStmtsCall ["For" ]]
@@ -3048,12 +3033,6 @@ def __init__(
3048
3033
self .is_orelse : bool = False
3049
3034
"""Whether the if-statement is the orelse-block of another if statement."""
3050
3035
3051
- self .orelse_lineno : Optional [int ] = None
3052
- """The line number of the ``else`` or ``elif`` keyword."""
3053
-
3054
- self .orelse_col_offset : Optional [int ] = None
3055
- """The column offset of the ``else`` or ``elif`` keyword."""
3056
-
3057
3036
super ().__init__ (
3058
3037
lineno = lineno ,
3059
3038
col_offset = col_offset ,
@@ -3067,9 +3046,6 @@ def postinit(
3067
3046
test : Optional [NodeNG ] = None ,
3068
3047
body : Optional [typing .List [NodeNG ]] = None ,
3069
3048
orelse : Optional [typing .List [NodeNG ]] = None ,
3070
- * ,
3071
- orelse_lineno : Optional [int ] = None ,
3072
- orelse_col_offset : Optional [int ] = None ,
3073
3049
) -> None :
3074
3050
"""Do some setup after initialisation.
3075
3051
@@ -3078,10 +3054,6 @@ def postinit(
3078
3054
:param body: The contents of the block.
3079
3055
3080
3056
:param orelse: The contents of the ``else`` block.
3081
-
3082
- :param orelse_lineno: The line number of the ``else`` or ``elif`` keyword.
3083
-
3084
- :param orelse_lineno: The column offset of the ``else`` or ``elif`` keyword.
3085
3057
"""
3086
3058
self .test = test
3087
3059
if body is not None :
@@ -3090,8 +3062,6 @@ def postinit(
3090
3062
self .orelse = orelse
3091
3063
if isinstance (self .parent , If ) and self in self .parent .orelse :
3092
3064
self .is_orelse = True
3093
- self .orelse_lineno = orelse_lineno
3094
- self .orelse_col_offset = orelse_col_offset
3095
3065
3096
3066
@cached_property
3097
3067
def blockstart_tolineno (self ):
@@ -3994,12 +3964,6 @@ def __init__(
3994
3964
self .orelse : typing .List [NodeNG ] = []
3995
3965
"""The contents of the ``else`` block."""
3996
3966
3997
- self .orelse_lineno : Optional [int ] = None
3998
- """The line number of the ``else`` keyword."""
3999
-
4000
- self .orelse_col_offset : Optional [int ] = None
4001
- """The column offset of the ``else`` keyword."""
4002
-
4003
3967
super ().__init__ (
4004
3968
lineno = lineno ,
4005
3969
col_offset = col_offset ,
@@ -4013,9 +3977,6 @@ def postinit(
4013
3977
body : Optional [typing .List [NodeNG ]] = None ,
4014
3978
handlers : Optional [typing .List [ExceptHandler ]] = None ,
4015
3979
orelse : Optional [typing .List [NodeNG ]] = None ,
4016
- * ,
4017
- orelse_lineno : Optional [int ] = None ,
4018
- orelse_col_offset : Optional [int ] = None ,
4019
3980
) -> None :
4020
3981
"""Do some setup after initialisation.
4021
3982
@@ -4024,19 +3985,13 @@ def postinit(
4024
3985
:param handlers: The exception handlers.
4025
3986
4026
3987
:param orelse: The contents of the ``else`` block.
4027
-
4028
- :param orelse_lineno: The line number of the ``else`` keyword.
4029
-
4030
- :param orelse_lineno: The column offset of the ``else`` keyword.
4031
3988
"""
4032
3989
if body is not None :
4033
3990
self .body = body
4034
3991
if handlers is not None :
4035
3992
self .handlers = handlers
4036
3993
if orelse is not None :
4037
3994
self .orelse = orelse
4038
- self .orelse_lineno = orelse_lineno
4039
- self .orelse_col_offset = orelse_col_offset
4040
3995
4041
3996
def _infer_name (self , frame , name ):
4042
3997
return name
@@ -4371,12 +4326,6 @@ def __init__(
4371
4326
self .orelse : typing .List [NodeNG ] = []
4372
4327
"""The contents of the ``else`` block."""
4373
4328
4374
- self .orelse_lineno : Optional [int ] = None
4375
- """The line number of the ``else`` keyword."""
4376
-
4377
- self .orelse_col_offset : Optional [int ] = None
4378
- """The column offset of the ``else`` keyword."""
4379
-
4380
4329
super ().__init__ (
4381
4330
lineno = lineno ,
4382
4331
col_offset = col_offset ,
@@ -4390,9 +4339,6 @@ def postinit(
4390
4339
test : Optional [NodeNG ] = None ,
4391
4340
body : Optional [typing .List [NodeNG ]] = None ,
4392
4341
orelse : Optional [typing .List [NodeNG ]] = None ,
4393
- * ,
4394
- orelse_lineno : Optional [int ] = None ,
4395
- orelse_col_offset : Optional [int ] = None ,
4396
4342
) -> None :
4397
4343
"""Do some setup after initialisation.
4398
4344
@@ -4401,18 +4347,12 @@ def postinit(
4401
4347
:param body: The contents of the loop.
4402
4348
4403
4349
:param orelse: The contents of the ``else`` block.
4404
-
4405
- :param orelse_lineno: The line number of the ``else`` keyword.
4406
-
4407
- :param orelse_lineno: The column offset of the ``else`` keyword.
4408
4350
"""
4409
4351
self .test = test
4410
4352
if body is not None :
4411
4353
self .body = body
4412
4354
if orelse is not None :
4413
4355
self .orelse = orelse
4414
- self .orelse_lineno = orelse_lineno
4415
- self .orelse_col_offset = orelse_col_offset
4416
4356
4417
4357
@cached_property
4418
4358
def blockstart_tolineno (self ):
0 commit comments