Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use None instead of ... for PrivateAttr #53

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading