Skip to content

Commit

Permalink
Bump ktfmt to latest version: 0.51 (project-chip#34034)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Jun 24, 2024
1 parent 504608b commit 50971be
Show file tree
Hide file tree
Showing 443 changed files with 5,638 additions and 5,638 deletions.
2 changes: 1 addition & 1 deletion scripts/tools/zap_regen_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def formatKotlinFiles(self, paths):
for name in paths:
logging.info(" %s" % name)

VERSION = "0.44"
VERSION = "0.51"
JAR_NAME = f"ktfmt-{VERSION}-jar-with-dependencies.jar"
jar_url = f"https://repo1.maven.org/maven2/com/facebook/ktfmt/{VERSION}/{JAR_NAME}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AccessControlClusterAccessControlEntryChangedEvent(
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?,
val fabricIndex: UInt
val fabricIndex: UInt,
) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlEntryChangedEvent {\n")
Expand Down Expand Up @@ -73,7 +73,7 @@ class AccessControlClusterAccessControlEntryChangedEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): AccessControlClusterAccessControlEntryChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID =
Expand Down Expand Up @@ -108,7 +108,7 @@ class AccessControlClusterAccessControlEntryChangedEvent(
adminPasscodeID,
changeType,
latestValue,
fabricIndex
fabricIndex,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AccessControlClusterAccessControlExtensionChangedEvent(
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?,
val fabricIndex: UInt
val fabricIndex: UInt,
) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlExtensionChangedEvent {\n")
Expand Down Expand Up @@ -73,7 +73,7 @@ class AccessControlClusterAccessControlExtensionChangedEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): AccessControlClusterAccessControlExtensionChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID =
Expand Down Expand Up @@ -108,7 +108,7 @@ class AccessControlClusterAccessControlExtensionChangedEvent(
adminPasscodeID,
changeType,
latestValue,
fabricIndex
fabricIndex,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ActionsClusterActionFailedEvent(
val actionID: UInt,
val invokeID: ULong,
val newState: UInt,
val error: UInt
val error: UInt,
) {
override fun toString(): String = buildString {
append("ActionsClusterActionFailedEvent {\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter

class BooleanStateConfigurationClusterAlarmsStateChangedEvent(
val alarmsActive: UInt,
val alarmsSuppressed: Optional<UInt>
val alarmsSuppressed: Optional<UInt>,
) {
override fun toString(): String = buildString {
append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n")
Expand All @@ -52,7 +52,7 @@ class BooleanStateConfigurationClusterAlarmsStateChangedEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): BooleanStateConfigurationClusterAlarmsStateChangedEvent {
tlvReader.enterStructure(tlvTag)
val alarmsActive = tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_ACTIVE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UInt) {

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): BooleanStateConfigurationClusterSensorFaultEvent {
tlvReader.enterStructure(tlvTag)
val sensorFault = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_FAULT))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNew

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): BridgedDeviceBasicInformationClusterReachableChangedEvent {
tlvReader.enterStructure(tlvTag)
val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: ULon

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): BridgedDeviceBasicInformationClusterStartUpEvent {
tlvReader.enterStructure(tlvTag)
val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
val heatingSourceControl:
Optional<
chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterHeatingSourceControlStruct
>?
>?,
) {
override fun toString(): String = buildString {
append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n")
Expand Down Expand Up @@ -135,7 +135,7 @@ class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {
tlvReader.enterStructure(tlvTag)
val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D))
Expand Down Expand Up @@ -237,7 +237,7 @@ class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(
averageLoadControl,
dutyCycleControl,
powerSavingsControl,
heatingSourceControl
heatingSourceControl,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter
class DeviceEnergyManagementClusterPowerAdjustEndEvent(
val cause: UInt,
val duration: ULong,
val energyUse: Long
val energyUse: Long,
) {
override fun toString(): String = buildString {
append("DeviceEnergyManagementClusterPowerAdjustEndEvent {\n")
Expand All @@ -52,7 +52,7 @@ class DeviceEnergyManagementClusterPowerAdjustEndEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): DeviceEnergyManagementClusterPowerAdjustEndEvent {
tlvReader.enterStructure(tlvTag)
val cause = tlvReader.getUInt(ContextSpecificTag(TAG_CAUSE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DishwasherAlarmClusterNotifyEvent(
val active: ULong,
val inactive: ULong,
val state: ULong,
val mask: ULong
val mask: ULong,
) {
override fun toString(): String = buildString {
append("DishwasherAlarmClusterNotifyEvent {\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DoorLockClusterLockOperationErrorEvent(
val fabricIndex: UInt?,
val sourceNode: ULong?,
val credentials:
Optional<List<chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct>>?
Optional<List<chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct>>?,
) {
override fun toString(): String = buildString {
append("DoorLockClusterLockOperationErrorEvent {\n")
Expand Down Expand Up @@ -128,7 +128,7 @@ class DoorLockClusterLockOperationErrorEvent(
this.add(
chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(
AnonymousTag,
tlvReader
tlvReader,
)
)
}
Expand All @@ -152,7 +152,7 @@ class DoorLockClusterLockOperationErrorEvent(
userIndex,
fabricIndex,
sourceNode,
credentials
credentials,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DoorLockClusterLockOperationEvent(
val fabricIndex: UInt?,
val sourceNode: ULong?,
val credentials:
Optional<List<chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct>>?
Optional<List<chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct>>?,
) {
override fun toString(): String = buildString {
append("DoorLockClusterLockOperationEvent {\n")
Expand Down Expand Up @@ -123,7 +123,7 @@ class DoorLockClusterLockOperationEvent(
this.add(
chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(
AnonymousTag,
tlvReader
tlvReader,
)
)
}
Expand All @@ -146,7 +146,7 @@ class DoorLockClusterLockOperationEvent(
userIndex,
fabricIndex,
sourceNode,
credentials
credentials,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DoorLockClusterLockUserChangeEvent(
val userIndex: UInt?,
val fabricIndex: UInt?,
val sourceNode: ULong?,
val dataIndex: UInt?
val dataIndex: UInt?,
) {
override fun toString(): String = buildString {
append("DoorLockClusterLockUserChangeEvent {\n")
Expand Down Expand Up @@ -125,7 +125,7 @@ class DoorLockClusterLockUserChangeEvent(
userIndex,
fabricIndex,
sourceNode,
dataIndex
dataIndex,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent(
val energyExported:
Optional<
chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct
>
>,
) {
override fun toString(): String = buildString {
append("ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent {\n")
Expand Down Expand Up @@ -61,7 +61,7 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent {
tlvReader.enterStructure(tlvTag)
val energyImported =
Expand Down Expand Up @@ -89,7 +89,7 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent(

return ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent(
energyImported,
energyExported
energyExported,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent(
val energyExported:
Optional<
chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct
>
>,
) {
override fun toString(): String = buildString {
append("ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent {\n")
Expand Down Expand Up @@ -61,7 +61,7 @@ class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent {
tlvReader.enterStructure(tlvTag)
val energyImported =
Expand Down Expand Up @@ -89,7 +89,7 @@ class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent(

return ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent(
energyImported,
energyExported
energyExported,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent {
tlvReader.enterStructure(tlvTag)
val ranges =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EnergyEvseClusterEVNotDetectedEvent(
val state: UInt,
val sessionDuration: ULong,
val sessionEnergyCharged: Long,
val sessionEnergyDischarged: Optional<Long>
val sessionEnergyDischarged: Optional<Long>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEVNotDetectedEvent {\n")
Expand Down Expand Up @@ -82,7 +82,7 @@ class EnergyEvseClusterEVNotDetectedEvent(
state,
sessionDuration,
sessionEnergyCharged,
sessionEnergyDischarged
sessionEnergyDischarged,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter
class EnergyEvseClusterEnergyTransferStartedEvent(
val sessionID: ULong,
val state: UInt,
val maximumCurrent: Long
val maximumCurrent: Long,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStartedEvent {\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
val sessionID: ULong,
val state: UInt,
val reason: UInt,
val energyTransferred: Long
val energyTransferred: Long,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStoppedEvent {\n")
Expand Down Expand Up @@ -67,7 +67,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
sessionID,
state,
reason,
energyTransferred
energyTransferred,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class EnergyEvseClusterFaultEvent(
val sessionID: ULong?,
val state: UInt,
val faultStatePreviousState: UInt,
val faultStateCurrentState: UInt
val faultStateCurrentState: UInt,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterFaultEvent {\n")
Expand Down Expand Up @@ -79,7 +79,7 @@ class EnergyEvseClusterFaultEvent(
sessionID,
state,
faultStatePreviousState,
faultStateCurrentState
faultStateCurrentState,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter

class GeneralDiagnosticsClusterHardwareFaultChangeEvent(
val current: List<UInt>,
val previous: List<UInt>
val previous: List<UInt>,
) {
override fun toString(): String = buildString {
append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n")
Expand Down Expand Up @@ -57,7 +57,7 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent(

fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
tlvReader: TlvReader,
): GeneralDiagnosticsClusterHardwareFaultChangeEvent {
tlvReader.enterStructure(tlvTag)
val current =
Expand Down
Loading

0 comments on commit 50971be

Please sign in to comment.