Skip to content

Commit

Permalink
fix: use None instead of ... for PrivateAttr (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jun 14, 2024
1 parent 0adc295 commit fc06f42
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/uiprotect/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ProtectBaseObject(BaseModel):
* Provides `.unifi_dict` to convert object back into UFP JSON
"""

_api: ProtectApiClient = PrivateAttr(...)
_api: ProtectApiClient = PrivateAttr(None)

_protect_objs: ClassVar[dict[str, type[ProtectBaseObject]] | None] = None
_protect_lists: ClassVar[dict[str, type[ProtectBaseObject]] | None] = None
Expand Down Expand Up @@ -633,9 +633,9 @@ def unifi_dict(
class ProtectModelWithId(ProtectModel):
id: str

_update_lock: asyncio.Lock = PrivateAttr(...)
_update_queue: asyncio.Queue[Callable[[], None]] = PrivateAttr(...)
_update_event: asyncio.Event = PrivateAttr(...)
_update_lock: asyncio.Lock = PrivateAttr(None)
_update_queue: asyncio.Queue[Callable[[], None]] = PrivateAttr(None)
_update_event: asyncio.Event = PrivateAttr(None)

def __init__(self, **data: Any) -> None:
update_lock = data.pop("update_lock", None)
Expand Down

0 comments on commit fc06f42

Please sign in to comment.