5858class HasDisplayData (object ):
5959 """ Basic mixin for elements that contain display data.
6060
61- It implements only the display_data method and a _namespace method.
61+ It implements only the display_data method and a
62+ _get_display_data_namespace method.
6263 """
6364 def display_data (self ):
6465 # type: () -> dict
@@ -85,7 +86,7 @@ def display_data(self):
8586 """
8687 return {}
8788
88- def _namespace (self ):
89+ def _get_display_data_namespace (self ):
8990 # type: () -> str
9091 return '{}.{}' .format (self .__module__ , self .__class__ .__name__ )
9192
@@ -109,7 +110,7 @@ def _populate_items(self, display_data_dict):
109110 for key , element in display_data_dict .items ():
110111 if isinstance (element , HasDisplayData ):
111112 subcomponent_display_data = DisplayData (
112- element ._namespace (), element .display_data ())
113+ element ._get_display_data_namespace (), element .display_data ())
113114 self .items += subcomponent_display_data .items
114115 continue
115116
@@ -216,7 +217,7 @@ def create_from_options(cls, pipeline_options):
216217 for k ,
217218 v in pipeline_options .display_data ().items ()
218219 }
219- return cls (pipeline_options ._namespace (), items )
220+ return cls (pipeline_options ._get_display_data_namespace (), items )
220221
221222 @classmethod
222223 def create_from (cls , has_display_data ):
@@ -236,7 +237,9 @@ def create_from(cls, has_display_data):
236237 raise ValueError (
237238 'Element of class {}.{} does not subclass HasDisplayData' .format (
238239 has_display_data .__module__ , has_display_data .__class__ .__name__ ))
239- return cls (has_display_data ._namespace (), has_display_data .display_data ())
240+ return cls (
241+ has_display_data ._get_display_data_namespace (),
242+ has_display_data .display_data ())
240243
241244
242245class DisplayDataItem (object ):
0 commit comments