diff --git a/scripts/py_matter_idl/matter_idl/lint/__init__.py b/scripts/py_matter_idl/matter_idl/lint/__init__.py index 3ab2b9f7badd25..6c7b1373f7a95e 100644 --- a/scripts/py_matter_idl/matter_idl/lint/__init__.py +++ b/scripts/py_matter_idl/matter_idl/lint/__init__.py @@ -14,4 +14,4 @@ from .lint_rules_parser import CreateParser -__all__ = [CreateParser] +__all__ = ['CreateParser'] diff --git a/scripts/tools/memory/memdf/__init__.py b/scripts/tools/memory/memdf/__init__.py index fa0e1070112ae4..0a523fbb29bbcb 100644 --- a/scripts/tools/memory/memdf/__init__.py +++ b/scripts/tools/memory/memdf/__init__.py @@ -18,4 +18,7 @@ from memdf.df import DF, DFs, ExtentDF, SectionDF, SegmentDF, SymbolDF from memdf.util.config import Config, ConfigDescription -__all__ = [DF, SymbolDF, SectionDF, SegmentDF, ExtentDF, DFs, Config, ConfigDescription] +__all__ = [ + 'DF', 'SymbolDF', 'SectionDF', 'SegmentDF', 'ExtentDF', + 'DFs', 'Config', 'ConfigDescription', +] diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index cff7adf4ae6fbb..eff056a243e54a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -36,6 +36,138 @@ ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue + +__all__ = [ + "Globals", + "Identify", + "Groups", + "OnOff", + "OnOffSwitchConfiguration", + "LevelControl", + "BinaryInputBasic", + "PulseWidthModulation", + "Descriptor", + "Binding", + "AccessControl", + "Actions", + "BasicInformation", + "OtaSoftwareUpdateProvider", + "OtaSoftwareUpdateRequestor", + "LocalizationConfiguration", + "TimeFormatLocalization", + "UnitLocalization", + "PowerSourceConfiguration", + "PowerSource", + "GeneralCommissioning", + "NetworkCommissioning", + "DiagnosticLogs", + "GeneralDiagnostics", + "SoftwareDiagnostics", + "ThreadNetworkDiagnostics", + "WiFiNetworkDiagnostics", + "EthernetNetworkDiagnostics", + "TimeSynchronization", + "BridgedDeviceBasicInformation", + "Switch", + "AdministratorCommissioning", + "OperationalCredentials", + "GroupKeyManagement", + "FixedLabel", + "UserLabel", + "ProxyConfiguration", + "ProxyDiscovery", + "ProxyValid", + "BooleanState", + "IcdManagement", + "Timer", + "OvenCavityOperationalState", + "OvenMode", + "LaundryDryerControls", + "ModeSelect", + "LaundryWasherMode", + "RefrigeratorAndTemperatureControlledCabinetMode", + "LaundryWasherControls", + "RvcRunMode", + "RvcCleanMode", + "TemperatureControl", + "RefrigeratorAlarm", + "DishwasherMode", + "AirQuality", + "SmokeCoAlarm", + "DishwasherAlarm", + "MicrowaveOvenMode", + "MicrowaveOvenControl", + "OperationalState", + "RvcOperationalState", + "ScenesManagement", + "HepaFilterMonitoring", + "ActivatedCarbonFilterMonitoring", + "BooleanStateConfiguration", + "ValveConfigurationAndControl", + "ElectricalPowerMeasurement", + "ElectricalEnergyMeasurement", + "WaterHeaterManagement", + "DemandResponseLoadControl", + "Messages", + "DeviceEnergyManagement", + "EnergyEvse", + "EnergyPreference", + "PowerTopology", + "EnergyEvseMode", + "WaterHeaterMode", + "DeviceEnergyManagementMode", + "DoorLock", + "WindowCovering", + "BarrierControl", + "ServiceArea", + "PumpConfigurationAndControl", + "Thermostat", + "FanControl", + "ThermostatUserInterfaceConfiguration", + "ColorControl", + "BallastConfiguration", + "IlluminanceMeasurement", + "TemperatureMeasurement", + "PressureMeasurement", + "FlowMeasurement", + "RelativeHumidityMeasurement", + "OccupancySensing", + "CarbonMonoxideConcentrationMeasurement", + "CarbonDioxideConcentrationMeasurement", + "NitrogenDioxideConcentrationMeasurement", + "OzoneConcentrationMeasurement", + "Pm25ConcentrationMeasurement", + "FormaldehydeConcentrationMeasurement", + "Pm1ConcentrationMeasurement", + "Pm10ConcentrationMeasurement", + "TotalVolatileOrganicCompoundsConcentrationMeasurement", + "RadonConcentrationMeasurement", + "WiFiNetworkManagement", + "ThreadBorderRouterManagement", + "ThreadNetworkDirectory", + "WakeOnLan", + "Channel", + "TargetNavigator", + "MediaPlayback", + "MediaInput", + "LowPower", + "KeypadInput", + "ContentLauncher", + "AudioOutput", + "ApplicationLauncher", + "ApplicationBasic", + "AccountLogin", + "ContentControl", + "ContentAppObserver", + "EcosystemInformation", + "CommissionerControl", + "ElectricalMeasurement", + "UnitTesting", + "FaultInjection", + "SampleMei", +] + + class Globals: class Enums: class AreaTypeTag(MatterIntEnum): diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index b135345e9657de..14dc6f3e1d4185 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -15,59 +15,5 @@ # limitations under the License. # -# -# @file -# Provides Python APIs for CHIP. -# - -"""Provides Python APIs for CHIP.""" - -from . import Attribute, CHIPClusters, Command -from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, - ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, - CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, - CommissionerControl, ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, - DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, - EcosystemInformation, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, - EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, - FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, - Globals, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, - KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode, LevelControl, - LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, MicrowaveOvenControl, MicrowaveOvenMode, - ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, - OnOffSwitchConfiguration, OperationalCredentials, OperationalState, OtaSoftwareUpdateProvider, - OtaSoftwareUpdateRequestor, OvenCavityOperationalState, OvenMode, OzoneConcentrationMeasurement, - Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, - PowerSourceConfiguration, PowerTopology, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, - PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, - RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode, - RvcOperationalState, RvcRunMode, ScenesManagement, ServiceArea, SmokeCoAlarm, SoftwareDiagnostics, Switch, - TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration, - ThreadBorderRouterManagement, ThreadNetworkDiagnostics, ThreadNetworkDirectory, TimeFormatLocalization, - TimeSynchronization, TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, UnitTesting, - UserLabel, ValveConfigurationAndControl, WakeOnLan, WaterHeaterManagement, WaterHeaterMode, - WiFiNetworkDiagnostics, WindowCovering) - -__all__ = [Attribute, CHIPClusters, Command, AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, - ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, - CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, CommissionerControl, - ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, - DoorLock, EcosystemInformation, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, - EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, - FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, Globals, GroupKeyManagement, Groups, - HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls, - LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, MicrowaveOvenControl, - MicrowaveOvenMode, ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, - OccupancySensing, OnOff, OnOffSwitchConfiguration, OperationalCredentials, OperationalState, - OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, OvenCavityOperationalState, OvenMode, - OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, - Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, PowerTopology, PressureMeasurement, ProxyConfiguration, - ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, - RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode, - RvcOperationalState, RvcRunMode, ScenesManagement, ServiceArea, SmokeCoAlarm, SoftwareDiagnostics, - Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration, - ThreadBorderRouterManagement, ThreadNetworkDiagnostics, ThreadNetworkDirectory, TimeFormatLocalization, TimeSynchronization, - TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, - UnitTesting, UserLabel, ValveConfigurationAndControl, WakeOnLan, WaterHeaterManagement, WaterHeaterMode, WiFiNetworkDiagnostics, WindowCovering] +from . import Attribute, CHIPClusters, Command, Objects # noqa: F401 +from .Objects import * # noqa: F401, F403 diff --git a/src/controller/python/chip/yaml/__init__.py b/src/controller/python/chip/yaml/__init__.py index 7f312912b6664a..db829e97647a16 100644 --- a/src/controller/python/chip/yaml/__init__.py +++ b/src/controller/python/chip/yaml/__init__.py @@ -23,4 +23,4 @@ from . import runner -__all__ = [runner] +__all__ = ['runner'] diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 0aa05721e69a16..3cb973d86dd356 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -19,6 +19,15 @@ from .ClusterObjects import (Cluster, ClusterAttributeDescriptor, ClusterCommand ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue + +__all__ = [ + "Globals", +{{#zcl_clusters}} + "{{asUpperCamelCase name}}", +{{/zcl_clusters}} +] + + class Globals: class Enums: {{#zcl_enums}}