Skip to content

Commit 72df9f0

Browse files
committed
sub 2 more globals() for NAME_TO_CLASS
1 parent 4daabfb commit 72df9f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotly/graph_objs/graph_objs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class PlotlyDict(dict):
298298
def __init__(self, *args, **kwargs):
299299
class_name = self.__class__.__name__
300300
super(PlotlyDict, self).__init__(*args, **kwargs)
301-
if issubclass(globals()[class_name], PlotlyTrace):
301+
if issubclass(NAME_TO_CLASS[class_name], PlotlyTrace):
302302
if (class_name != 'PlotlyTrace') and (class_name != 'Trace'):
303303
self['type'] = NAME_TO_KEY[class_name]
304304
self.validate()
@@ -836,7 +836,7 @@ def to_graph_objs(self, caller=True):
836836
"""
837837
for index, entry in enumerate(self):
838838
if isinstance(entry, (PlotlyDict, PlotlyList)):
839-
if not isinstance(entry, globals()['Annotation']):
839+
if not isinstance(entry, NAME_TO_CLASS['Annotation']):
840840
raise exceptions.PlotlyListEntryError(
841841
obj=self,
842842
index=index,

0 commit comments

Comments
 (0)