From 20544483006f339a79bc1aea28a198d36130e683 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 22 Mar 2023 13:04:16 -0400 Subject: [PATCH] Restyle --- .../py_matter_idl/matter_idl/generators/java/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 6dcaa0692e6927..e8cf723b4be75f 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -20,7 +20,8 @@ from matter_idl.generators import CodeGenerator, GeneratorStorage from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, StructTag +from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, + StructTag) from stringcase import capitalcase @@ -355,6 +356,7 @@ def CanGenerateSubscribe(attr: Attribute, lookup: TypeLookupContext) -> bool: return not lookup.is_struct_type(attr.definition.data_type.name) + def IsResponseStruct(s: Struct) -> bool: return s.tag == StructTag.RESPONSE @@ -400,10 +402,10 @@ def internal_render_all(self): self.internal_render_one_output( template_path="java/CHIPCallbackTypes.jinja", output_file_name="jni/CHIPCallbackTypes.h", - vars= { + vars={ 'idl': self.idl, 'clientClusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], - } + } ) # Every cluster has its own impl, to avoid