File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -147,11 +147,22 @@ def transform(cls: nodes.ClassDef):
147147 if (
148148 isinstance (target , nodes .Subscript )
149149 and target .value .value .name == "schema"
150- and target .value .slice .value .value == "properties"
151150 ):
152- property_name_node = target .slice .value
151+ if (
152+ isinstance (target .value .slice .value , nodes .Const )
153+ and target .value .slice .value .value == "properties"
154+ ):
155+ property_name_node = target .slice .value
156+ elif (
157+ isinstance (target .value .slice , nodes .Const )
158+ and target .value .slice .value == "properties"
159+ ):
160+ property_name_node = target .slice
161+ else :
162+ # not schema["properties"]
163+ continue
153164 else :
154- # not schema["properties" ]
165+ # not schema[... ]
155166 continue
156167 except AttributeError :
157168 continue
You can’t perform that action at this time.
0 commit comments