@@ -170,7 +170,6 @@ def onTreeSelect(self, event: tk.Event):
170170 v_widget .cdivar = cdivar
171171 v_widget .tip = nameLabel .tip
172172
173-
174173 address_str = ""
175174 if address_str is not None :
176175 address_str = str (cm .address )
@@ -291,6 +290,7 @@ def _onPopScope(self, cm: CDIMemo):
291290 nameLower = cm .tag .lower () if cm .tag else None
292291 assert nameLower is not None # only None for done/fail events
293292 cm .content
293+ assert self ._treeview is not None
294294 if nameLower == "name" :
295295 parentIID = self .getParentBranch (cm )
296296 assert parentIID is not None , "name must be in a branch"
@@ -302,7 +302,7 @@ def _onPopScope(self, cm: CDIMemo):
302302 self .indent () + f"content is None for /{ cm .tag } " )
303303 cm .content = ""
304304 # "name" applies to parent, such as "segment" or "string"
305- parent = self ._treeview .item (
305+ _ = self ._treeview .item (
306306 parentIID , text = cm .content .strip ())
307307 origin = cm .element .attrib .get ('origin' ) if cm .element else None
308308 if cm .content :
@@ -409,17 +409,17 @@ def _onPushScope(self, cm: CDIMemo):
409409 self .debug_write (name )
410410 # if attrs is not None and attrs:
411411 # self.debug(" {}".format(attrs_to_dict(attrs)))
412-
412+ assert self . _treeview is not None
413413 if tagLower in ("segment" , "group" ):
414414 content = "" # Temporary (The visible text is set to content of
415415 # name element in _onPopScope)
416416 # if not name:
417417 if tagLower == "segment" :
418418 space = cm .element .attrib ['space' ]
419419 content = space
420- origin = None
421- if 'origin' in cm .element .attrib :
422- origin = cm .element .attrib ['origin' ]
420+ # origin = None
421+ # if 'origin' in cm.element.attrib:
422+ # origin = cm.element.attrib['origin']
423423 elif tagLower == "group" :
424424 if 'offset' in cm .element .attrib :
425425 content = cm .element .attrib ['offset' ]
0 commit comments