Skip to content

Commit

Permalink
Update description tag handling in xml (#29114)
Browse files Browse the repository at this point in the history
* Update description tag handling in xml

* enable description on events

* Fix test
  • Loading branch information
andy31415 authored and pull[bot] committed Dec 1, 2023
1 parent 4da868d commit 97de7fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/py_matter_idl/matter_idl/matter_idl_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Event:
fields: List[Field]
readacl: AccessPrivilege = AccessPrivilege.VIEW
qualities: EventQuality = EventQuality.NONE
description: Optional[str] = None

@property
def is_fabric_sensitive(self):
Expand Down
1 change: 1 addition & 0 deletions scripts/py_matter_idl/matter_idl/test_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def testFabricScopedAndSensitive(self):
events=[Event(priority=EventPriority.INFO,
name='FabricEvent',
code=0x1234,
description="This is a test event",
fields=[Field(data_type=DataType(name='node_id'),
code=1,
name='AdminNodeID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class DescriptionHandler(BaseHandler):
"""

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

def HandleContent(self, content):
Expand Down

0 comments on commit 97de7fe

Please sign in to comment.