Skip to content

Commit

Permalink
Silence warnings about descriptions not being handled when running YA…
Browse files Browse the repository at this point in the history
…ML tests. (#29111)

We kept getting these warnings:

    TEST ERR  : WARNING:root:TAG configurator::cluster::description was not handled/recognized at src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml:33:7
    TEST ERR  : WARNING:root:TAG configurator::cluster::command::description was not handled/recognized at src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml:47:6
    TEST ERR  : WARNING:root:TAG configurator::clusterExtension::command::description was not handled/recognized at src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml:21:104

The fix is to change DescriptionHandler to note that it's handling the tag.
This also lets us switch events to also use DescriptionHandler.
  • Loading branch information
bzbarsky-apple authored Sep 7, 2023
1 parent 1b31a96 commit 4197b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def GetNextProcessor(self, name: str, attrs):
self._event.readacl = AttrsToAccessPrivilege(attrs)
return BaseHandler(self.context, handled=HandledDepth.SINGLE_TAG)
elif name.lower() == 'description':
return BaseHandler(self.context, handled=HandledDepth.ENTIRE_TREE)
return DescriptionHandler(self.context, self._event)
else:
return BaseHandler(self.context)

Expand Down Expand Up @@ -347,7 +347,7 @@ class DescriptionHandler(BaseHandler):
"""

def __init__(self, context: Context, target: Any):
super().__init__(context)
super().__init__(context, handled=HandledDepth.ENTIRE_TREE)
self.target = target

def HandleContent(self, content):
Expand Down

0 comments on commit 4197b3e

Please sign in to comment.