Skip to content

Commit

Permalink
Restyled by autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and cecille committed Oct 4, 2023
1 parent 4de8166 commit f8a804e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controller/python/chip/clusters/ClusterObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def FromTLV(cls, data: bytes):
def descriptor(cls):
raise NotImplementedError()


# The below dictionaries will be filled dynamically
# and are used for quick lookup/mapping from cluster/attribute id to the correct class
ALL_CLUSTERS = {}
Expand All @@ -214,6 +215,7 @@ def descriptor(cls):
ALL_ACCEPTED_COMMANDS = {}
ALL_GENERATED_COMMANDS = {}


class ClusterCommand(ClusterObject):
def __init_subclass__(cls, *args, **kwargs) -> None:
"""Register a subclass."""
Expand All @@ -231,6 +233,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None:
# handle case where the ClusterAttribute class is not (fully) subclassed
# and accessing the id property throws a NotImplementedError.
pass

@ChipUtility.classproperty
def cluster_id(self) -> int:
raise NotImplementedError()
Expand All @@ -244,8 +247,6 @@ def must_use_timed_invoke(cls) -> bool:
return False




class Cluster(ClusterObject):
'''
When send read requests with returnClusterObject=True, we will set the data_version property of the object.
Expand Down
1 change: 1 addition & 0 deletions src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class CommandPathLocation:
cluster_id: int
command_id: int


@dataclass
class ClusterPathLocation:
endpoint_id: int
Expand Down

0 comments on commit f8a804e

Please sign in to comment.