File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 4
4
5
5
from collections .abc import Callable
6
6
from dataclasses import dataclass , field
7
+ from datetime import datetime # noqa: TCH003
7
8
from enum import Enum
8
- from typing import TYPE_CHECKING , Any
9
-
10
- if TYPE_CHECKING :
11
- from datetime import datetime
9
+ from typing import Any
12
10
13
11
# Enums and constants
14
12
Original file line number Diff line number Diff line change 4
4
import os
5
5
from typing import TYPE_CHECKING
6
6
7
+ import chip .CertificateAuthority
7
8
from chip .ChipStack import ChipStack
8
9
import chip .logging
9
10
from chip .logging import (
17
18
import chip .native
18
19
19
20
if TYPE_CHECKING :
20
- from chip .CertificateAuthority import CertificateAuthorityManager
21
+ from chip .FabricAdmin import FabricAdmin
21
22
22
23
from .server import MatterServer
23
24
@@ -111,10 +112,8 @@ def __init__(
111
112
112
113
# Initialize Certificate Authority Manager
113
114
# yeah this is a bit weird just to prevent a circular import in the underlying SDK
114
- self .certificate_authority_manager : CertificateAuthorityManager = (
115
- chip .CertificateAuthority .CertificateAuthorityManager (
116
- chipStack = self ._chip_stack
117
- )
115
+ self .certificate_authority_manager : chip .CertificateAuthority .CertificateAuthorityManager = chip .CertificateAuthority .CertificateAuthorityManager (
116
+ chipStack = self ._chip_stack
118
117
)
119
118
self .certificate_authority_manager .LoadAuthoritiesFromStorage ()
120
119
@@ -131,7 +130,7 @@ def __init__(
131
130
admin .vendorId == server .vendor_id
132
131
and admin .fabricId == server .fabric_id
133
132
):
134
- self .fabric_admin = admin
133
+ self .fabric_admin : FabricAdmin = admin
135
134
break
136
135
else :
137
136
self .fabric_admin = cert_auth .NewFabricAdmin (
You can’t perform that action at this time.
0 commit comments