Small bug in 3.6+ in finding class name

This commit is contained in:
rocky 2020-01-20 22:43:20 -05:00
parent eacc3f5cc7
commit e466e826b3

View File

@ -200,7 +200,7 @@ def customize_for_version3(self, version):
# * subclass_code - the code for the subclass body
subclass_info = None
if node == "classdefdeco2":
if self.version >= 3.6:
if self.version >= 3.6 and isinstance(node[1][1].attr, str):
class_name = node[1][1].attr
elif self.version <= 3.3:
class_name = node[2][0].attr