File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
- # Copyright (c) 2018-2021, 2023 by Rocky Bernstein
1
+ # Copyright (c) 2018-2021, 2023-2024 by Rocky Bernstein
2
2
#
3
3
# This program is free software: you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
@@ -139,14 +139,10 @@ def n_classdef3(node):
139
139
# Python 3.2 works like this
140
140
subclass_code = find_code_node (load_closure , - 2 ).attr
141
141
else :
142
- raise "Internal Error n_classdef: cannot find class body"
143
- if hasattr (build_class [3 ], "__len__" ):
144
- if not subclass_info :
145
- subclass_info = build_class [3 ]
146
- elif hasattr (build_class [2 ], "__len__" ):
147
- subclass_info = build_class [2 ]
148
- else :
149
- raise "Internal Error n_classdef: cannot superclass name"
142
+ raise RuntimeError ("Internal Error n_classdef: cannot find class body" )
143
+
144
+ subclass_info = build_class
145
+
150
146
elif not subclass_info :
151
147
if mkfunc [0 ] in ("no_kwargs" , "kwargs" ):
152
148
subclass_code = mkfunc [1 ].attr
You can’t perform that action at this time.
0 commit comments