Skip to content

Commit

Permalink
restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
Alami-Amine committed Jul 19, 2024
1 parent b1e2476 commit 1ac1e79
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/controller/python/chip/clusters/Attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import chip.exceptions
import chip.interaction_model
import chip.tlv
import construct # type: ignore
import construct # type: ignore
from chip.interaction_model import PyWriteAttributeData
from chip.native import ErrorSDKPart, PyChipError
from rich.pretty import pprint # type: ignore
from rich.pretty import pprint # type: ignore

from .ClusterObjects import Cluster, ClusterAttributeDescriptor, ClusterEvent

Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/clusters/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from threading import Lock

from aenum import IntEnum, extend_enum # type: ignore
from aenum import IntEnum, extend_enum # type: ignore

# Flag on whether we should map unknown enum values to kUnknownEnumValue.
_map_missing_enum_to_unknown_enum_value = True
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/crypto/p256keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ctypes import CFUNCTYPE, POINTER, c_bool, c_char, c_size_t, c_uint8, c_uint32, c_void_p, memmove, py_object, string_at

from chip import native
from ecdsa import ECDH, NIST256p, SigningKey # type: ignore
from ecdsa import ECDH, NIST256p, SigningKey # type: ignore

_pychip_P256Keypair_ECDSA_sign_msg_func = CFUNCTYPE(
c_bool, py_object, POINTER(c_uint8), c_size_t, POINTER(c_uint8), POINTER(c_size_t))
Expand Down
4 changes: 2 additions & 2 deletions src/controller/python/chip/interaction_model/delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

import ctypes
import threading
from typing import Any, Dict, Optional
from ctypes import CFUNCTYPE, POINTER, c_uint8, c_uint32, c_uint64, c_void_p
from dataclasses import dataclass
from typing import Any, Dict, Optional

import chip.exceptions
import chip.native
import chip.tlv
from construct import Int8ul, Int16ul, Int32ul, Int64ul, Struct # type: ignore
from construct import Int8ul, Int16ul, Int32ul, Int64ul, Struct # type: ignore

# The type should match CommandStatus in interaction_model/Delegate.h
# CommandStatus should not contain padding
Expand Down
5 changes: 2 additions & 3 deletions src/controller/python/chip/native/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from dataclasses import dataclass

import chip.exceptions
import construct # type: ignore
import construct # type: ignore


class Library(enum.Enum):
Expand Down Expand Up @@ -86,8 +86,7 @@ def raise_on_error(self) -> None:
if self.code != 0:
exception = self.to_exception()
if exception is not None: # Ensure exception is not None to avoid mypy error and only raise valid exceptions
raise exception

raise exception

@property
def is_success(self) -> bool:
Expand Down

0 comments on commit 1ac1e79

Please sign in to comment.