Skip to content

Commit

Permalink
Restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Mar 23, 2023
1 parent 4a9a2b6 commit 2054448
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/py_matter_idl/matter_idl/generators/java/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2054448

Please sign in to comment.