Skip to content

Commit

Permalink
Fix usage of __all__, add missing __all__ assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed Nov 8, 2023
1 parent 5087da3 commit 49315ec
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pywidevine/cdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,4 @@ def _derive(session_key: bytes, context: bytes, counter: int) -> bytes:
return enc_key, mac_key_server, mac_key_client


__ALL__ = (Cdm,)
__all__ = ("Cdm",)
2 changes: 1 addition & 1 deletion pywidevine/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,4 @@ def migrate(cls, data: Union[bytes, str]) -> Device:
raise ValueError(f"Device Data seems to be corrupt or invalid, or migration failed, {e}")


__ALL__ = (Device, DeviceTypes)
__all__ = ("Device", "DeviceTypes")
3 changes: 3 additions & 0 deletions pywidevine/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ def kid_to_uuid(kid: Union[str, bytes]) -> UUID:
kid += b"\x00" * (16 - len(kid))

return UUID(bytes=kid)


__all__ = ("Key",)
3 changes: 3 additions & 0 deletions pywidevine/pssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,6 @@ def parse_key_ids(key_ids: list[Union[UUID, str, bytes]]) -> list[UUID]:
]

return uuids


__all__ = ("PSSH",)
2 changes: 1 addition & 1 deletion pywidevine/remotecdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ def get_keys(self, session_id: bytes, type_: Optional[Union[int, str]] = None) -
]


__ALL__ = (RemoteCdm,)
__all__ = ("RemoteCdm",)
3 changes: 3 additions & 0 deletions pywidevine/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ def __init__(self, number: int):
self.service_certificate: Optional[SignedDrmCertificate] = None
self.context: dict[bytes, tuple[bytes, bytes]] = {}
self.keys: list[Key] = []


__all__ = ("Session",)

0 comments on commit 49315ec

Please sign in to comment.